Reload images when downloading or removing a mod

This commit is contained in:
Yair Morgenstern
2023-09-21 14:58:23 +03:00
parent 92b71102e1
commit 0d942ac175
4 changed files with 12 additions and 8 deletions

View File

@ -191,7 +191,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
}
ImageGetter.resetAtlases()
ImageGetter.setNewRuleset(ImageGetter.ruleset) // This needs to come after the settings, since we may have default visual mods
ImageGetter.reloadImages() // This needs to come after the settings, since we may have default visual mods
val imageGetterTilesets = ImageGetter.getAvailableTilesets()
val availableTileSets = TileSetCache.getAvailableTilesets(imageGetterTilesets)
if (settings.tileSet !in availableTileSets) { // If the configured tileset is no longer available, default back