Reset ruleset when entering main menu screen, so that all map elements for the background will be available after returning from a modded game that removed some of them
This commit is contained in:
parent
c94079c0a7
commit
84a06b7fcb
1 changed files with 5 additions and 0 deletions
|
@ -41,6 +41,11 @@ class MainMenuScreen: CameraStageBaseScreen() {
|
|||
stage.addActor(backgroundTable)
|
||||
backgroundTable.center(stage)
|
||||
|
||||
// If we were in a mod, some of the resource images for the background map we're creating
|
||||
// will not exist unless we reset the ruleset and images
|
||||
ImageGetter.ruleset = RulesetCache.getBaseRuleset()
|
||||
ImageGetter.refreshAtlas()
|
||||
|
||||
thread(name="ShowMapBackground") {
|
||||
val newMap = MapGenerator(RulesetCache.getBaseRuleset())
|
||||
.generateMap(MapParameters().apply { size = MapSize.Small; type=MapType.default })
|
||||
|
|
Loading…
Reference in a new issue