mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
Hydro plant bugfix
This commit is contained in:
@ -97,9 +97,12 @@ class GameInfo {
|
||||
civInfo.setTransients()
|
||||
}
|
||||
|
||||
for (civInfo in civilizations)
|
||||
for (civInfo in civilizations) {
|
||||
// we have to remove hydro plants from all cities BEFORE we update a single one,
|
||||
// because updating leads to getting the building uniques from the civ info,
|
||||
// which in turn leads to us trying to get info on all the building in all the cities...
|
||||
// which can ail i there's an "unregistered" building anywhere
|
||||
for (cityInfo in civInfo.cities) {
|
||||
|
||||
val cityConstructions = cityInfo.cityConstructions
|
||||
// As of 2.9.6, removed hydro plant, since it requires rivers, which we do not yet have
|
||||
if ("Hydro Plant" in cityConstructions.builtBuildings)
|
||||
@ -108,9 +111,10 @@ class GameInfo {
|
||||
cityConstructions.currentConstruction = ""
|
||||
cityConstructions.chooseNextConstruction()
|
||||
}
|
||||
|
||||
cityInfo.cityStats.update()
|
||||
}
|
||||
|
||||
for (cityInfo in civInfo.cities) cityInfo.cityStats.update()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user