mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 22:54:44 +07:00
Clearer pop change limit
This commit is contained in:
parent
c87ed50a98
commit
92fd488301
@ -130,10 +130,8 @@ class CityPopulationManager : IsPartOfGameInfoSerialization {
|
||||
}
|
||||
|
||||
fun addPopulation(count: Int) {
|
||||
val changedAmount =
|
||||
if (population + count < 1) 1 - population
|
||||
else count
|
||||
population += count
|
||||
val changedAmount = count.coerceAtMost(population - 1)
|
||||
population += changedAmount
|
||||
val freePopulation = getFreePopulation()
|
||||
if (freePopulation < 0) {
|
||||
unassignExtraPopulation()
|
||||
|
Loading…
Reference in New Issue
Block a user