mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 22:37:02 -04:00
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
@ -41,6 +41,11 @@ class MainMenuScreen: CameraStageBaseScreen() {
|
|||||||
stage.addActor(backgroundTable)
|
stage.addActor(backgroundTable)
|
||||||
backgroundTable.center(stage)
|
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") {
|
thread(name="ShowMapBackground") {
|
||||||
val newMap = MapGenerator(RulesetCache.getBaseRuleset())
|
val newMap = MapGenerator(RulesetCache.getBaseRuleset())
|
||||||
.generateMap(MapParameters().apply { size = MapSize.Small; type=MapType.default })
|
.generateMap(MapParameters().apply { size = MapSize.Small; type=MapType.default })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user