mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 20:59:18 +07:00
Game can handle mods removing tile features between versions
This commit is contained in:
@ -331,6 +331,8 @@ class GameInfo {
|
||||
// So we remove them so the game doesn't crash when it tries to access them.
|
||||
private fun removeMissingModReferences() {
|
||||
for (tile in tileMap.values) {
|
||||
if (tile.terrainFeature!=null && !ruleSet.terrains.containsKey(tile.terrainFeature!!))
|
||||
tile.terrainFeature = null
|
||||
if (tile.resource != null && !ruleSet.tileResources.containsKey(tile.resource!!))
|
||||
tile.resource = null
|
||||
if (tile.improvement != null && !ruleSet.tileImprovements.containsKey(tile.improvement!!)
|
||||
|
Reference in New Issue
Block a user