Allow ai city to re-assign specialists.
This commit is contained in:
parent
bb12fc7cdb
commit
d364f3896c
2 changed files with 10 additions and 0 deletions
|
@ -117,6 +117,7 @@ class NextTurnAutomation{
|
|||
private fun reassignWorkedTiles(civInfo: CivilizationInfo) {
|
||||
for (city in civInfo.cities) {
|
||||
city.workedTiles.clear()
|
||||
city.population.specialists.clear()
|
||||
(0..city.population.population).forEach { city.population.autoAssignPopulation() }
|
||||
Automation().chooseNextConstruction(city.cityConstructions)
|
||||
if (city.health < city.getMaxHealth())
|
||||
|
|
|
@ -15,6 +15,15 @@ open class Stats() {
|
|||
setStats(hashMap)
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
production = 0f
|
||||
food = 0f
|
||||
gold = 0f
|
||||
science = 0f
|
||||
culture = 0f
|
||||
happiness = 0f
|
||||
}
|
||||
|
||||
fun add(other: Stats) {
|
||||
// Doing this through the hashmap is nicer code but is SUPER INEFFICIENT!
|
||||
production += other.production
|
||||
|
|
Loading…
Reference in a new issue