Moving a city to a cityless Civ flags it as capital (#1556)

This commit is contained in:
r3versi
2019-12-28 18:10:26 +01:00
committed by Yair Morgenstern
parent 4baf5416ce
commit 461f285059
2 changed files with 7 additions and 2 deletions

View File

@ -448,7 +448,7 @@ class CityInfo {
for(building in cityConstructions.getBuiltBuildings().filter { it.requiredBuildingInAllCities!=null })
cityConstructions.removeBuilding(building.name)
// Remove/relocate palace
// Remove/relocate palace for old Civ
if(cityConstructions.isBuilt("Palace")){
cityConstructions.removeBuilding("Palace")
if(oldCiv.cities.isNotEmpty()){
@ -456,6 +456,11 @@ class CityInfo {
}
}
// Locate palace for newCiv if this is the only city they have
if (newCivInfo.cities.count() == 1) {
cityConstructions.addBuilding("Palace")
}
isBeingRazed=false
// Transfer unique buildings

View File

@ -182,7 +182,7 @@ class CivInfoTransientUpdater(val civInfo: CivilizationInfo){
if(!initialSetup){ // In the initial setup we're loading an old game state, so it doesn't really count
for(city in citiesReachedToMediums.keys)
if(city !in civInfo.citiesConnectedToCapital && city.civInfo == civInfo)
if(city !in civInfo.citiesConnectedToCapital && city.civInfo == civInfo && city != civInfo.getCapital())
civInfo.addNotification("[${city.name}] has been connected to your capital!",city.location, Color.GOLD)
for(city in civInfo.citiesConnectedToCapital)