mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-25 07:09:16 +07:00
Mods can now remove promotions between versions without breaking existing saves
This commit is contained in:
@ -261,6 +261,11 @@ class GameInfo {
|
|||||||
tile.resource = null
|
tile.resource = null
|
||||||
if (tile.improvement != null && !ruleSet.tileImprovements.containsKey(tile.improvement!!))
|
if (tile.improvement != null && !ruleSet.tileImprovements.containsKey(tile.improvement!!))
|
||||||
tile.improvement = null
|
tile.improvement = null
|
||||||
|
|
||||||
|
for (unit in tile.getUnits())
|
||||||
|
for (promotion in unit.promotions.promotions.toList())
|
||||||
|
if (!ruleSet.unitPromotions.containsKey(promotion))
|
||||||
|
unit.promotions.promotions.remove(promotion)
|
||||||
}
|
}
|
||||||
|
|
||||||
tileMap.setTransients(ruleSet)
|
tileMap.setTransients(ruleSet)
|
||||||
|
Reference in New Issue
Block a user