mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-25 15:19:51 +07:00
Moving a city to a cityless Civ flags it as capital (#1556)
This commit is contained in:

committed by
Yair Morgenstern

parent
4baf5416ce
commit
461f285059
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user