2021-November-14 - Prerelease - 2.6.461
Pre-release
Pre-release
Refactor/UIContext & ResourceLoader (#9775)
Various refactors to resource loader:
update UiContext so 'internalSetMap' is only called from constructor. To do this, we create a new UIContext when changing skins rather than mutating the UiContext
various additional refactoring updates to distinguish map name from map path.
update ResourceLoader to receive as input 'map path' rather than 'map name'
* Re-order method and variable assignment
* Simplify: setResourceLoader does not need to invoke 'getDefaultDirectory'
The 'getDefault' method is used to get the preferred skin for a map. A
headless game does not need a map skin, the 'getDefault' method always
returns the same parameter value passed to it.
* Refactor: Move method
* Inline method 'getDefaultMapDir'
* Update setter method name
* Refactor: fix/rename variable, rename 'mapDir' -> 'mapName'
* Move functionality, move searching of installed maps for a given map from ResourceLoader to InstalledMapsListing
* Clean up UIContext constructor code for clarity
* Convert ResourceLoader to use 'Path' instead of 'mapName' & inline method 'isImageLoaded'
* Refactor: Create a new UiContext when switching map skins
* Formatting