mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 12:48:56 +07:00
Allow ai city to re-assign specialists.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user