mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-09 10:29:02 +07:00
Resolved #9638 - Removing old buildings on enemy capital (when not last city) no longer crashes
This commit is contained in:
parent
ee668710e2
commit
a246baa333
@ -289,16 +289,16 @@ class CityInfoConquestFunctions(val city: City){
|
||||
// Stop WLTKD if it's still going
|
||||
resetWLTKD()
|
||||
|
||||
// Remove their free buildings from this city and remove free buildings provided by the city from their cities
|
||||
removeBuildingsOnMoveToCiv(oldCiv)
|
||||
|
||||
// Place palace for newCiv if this is the only city they have
|
||||
// This needs to happen _before_ free buildings are added, as sometimes these should
|
||||
// only be placed in the capital, and then there needs to be a capital.
|
||||
// Place palace for newCiv if this is the only city they have.
|
||||
// This needs to happen _before_ buildings are added or removed,
|
||||
// as any building change triggers a reevaluation of stats which assumes there to be a capital
|
||||
if (newCiv.cities.size == 1) {
|
||||
newCiv.moveCapitalTo(this)
|
||||
}
|
||||
|
||||
// Remove their free buildings from this city and remove free buildings provided by the city from their cities
|
||||
removeBuildingsOnMoveToCiv(oldCiv)
|
||||
|
||||
// Add our free buildings to this city and add free buildings provided by the city to other cities
|
||||
civ.civConstructions.tryAddFreeBuildings()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user