mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 23:10:39 -04:00
Fix ConcurrentModificationException when puppeting a city (#9430)
This commit is contained in:
parent
5f60c887f7
commit
b3166c4922
@ -203,11 +203,9 @@ class CityPopulationManager : IsPartOfGameInfoSerialization {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// unassign specialists that cannot be (e.g. the city was captured and one of the specialist buildings was destroyed)
|
// unassign specialists that cannot be (e.g. the city was captured and one of the specialist buildings was destroyed)
|
||||||
val maxSpecialists = getMaxSpecialists()
|
for ((specialistName, maxAmount) in getMaxSpecialists())
|
||||||
val specialistsHashmap = specialistAllocations
|
if (specialistAllocations[specialistName] > maxAmount)
|
||||||
for ((specialistName, amount) in specialistsHashmap)
|
specialistAllocations[specialistName] = maxAmount
|
||||||
if (amount > maxSpecialists[specialistName])
|
|
||||||
specialistAllocations[specialistName] = maxSpecialists[specialistName]
|
|
||||||
|
|
||||||
val localUniqueCache = LocalUniqueCache()
|
val localUniqueCache = LocalUniqueCache()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user