mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +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
|
||||
if (tile.improvement != null && !ruleSet.tileImprovements.containsKey(tile.improvement!!))
|
||||
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)
|
||||
|
Reference in New Issue
Block a user