Solved promotion name-change bug
This commit is contained in:
parent
4d285e972d
commit
232896665e
1 changed files with 13 additions and 10 deletions
|
@ -185,6 +185,19 @@ class GameInfo {
|
|||
// will be done here, and not in CivInfo.setTransients or CityInfo
|
||||
fun setTransients() {
|
||||
tileMap.gameInfo = this
|
||||
|
||||
|
||||
// Renames as of version 3.1.8, because of translation conflicts with the property "Range" and the difficulty "Immortal"
|
||||
// Needs to be BEFORE tileMap.setTransients, because the units' setTransients is called from there
|
||||
for(tile in tileMap.values)
|
||||
for(unit in tile.getUnits()){
|
||||
if(unit.name=="Immortal") unit.name="Persian Immortal"
|
||||
if(unit.promotions.promotions.contains("Range")){
|
||||
unit.promotions.promotions.remove("Range")
|
||||
unit.promotions.promotions.add("Extended Range")
|
||||
}
|
||||
}
|
||||
|
||||
tileMap.setTransients()
|
||||
|
||||
if(currentPlayer=="") currentPlayer=civilizations.first { it.isPlayerCivilization() }.civName
|
||||
|
@ -233,16 +246,6 @@ class GameInfo {
|
|||
}
|
||||
}
|
||||
|
||||
// Renames as of version 3.1.8, because of translation conflicts with the property "Range" and the difficulty "Immortal"
|
||||
for(tile in tileMap.values)
|
||||
for(unit in tile.getUnits()){
|
||||
if(unit.name=="Immortal") unit.name="Persian Immortal"
|
||||
if(unit.promotions.promotions.contains("Range")){
|
||||
unit.promotions.promotions.remove("Range")
|
||||
unit.promotions.promotions.add("Extended Range")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (civInfo in civilizations) civInfo.setNationTransient()
|
||||
for (civInfo in civilizations) civInfo.setTransients()
|
||||
|
|
Loading…
Reference in a new issue