mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Fixed a crash that occasionally happened when liberating a city to a dead civ (#5762)
* Fixed a crash that occasionally happened when liberating a city to a dead civ * Added descriptive comment
This commit is contained in:
parent
10be481524
commit
2fa3228148
@ -274,14 +274,17 @@ class CityInfoConquestFunctions(val city: CityInfo){
|
||||
|
||||
// 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
|
||||
civInfo.civConstructions.tryAddFreeBuildings()
|
||||
|
||||
// Place palace for newCiv if this is the only city they have
|
||||
// This needs to happen _before_ free buildings are added, as somtimes these should
|
||||
// only be placed in the capital, and then there needs to be a capital.
|
||||
if (newCivInfo.cities.count() == 1) {
|
||||
cityConstructions.addBuilding(capitalCityIndicator)
|
||||
}
|
||||
|
||||
// Add our free buildings to this city and add free buildings provided by the city to other cities
|
||||
civInfo.civConstructions.tryAddFreeBuildings()
|
||||
|
||||
isBeingRazed = false
|
||||
|
||||
// Transfer unique buildings
|
||||
|
@ -94,7 +94,7 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags:
|
||||
@Deprecated("As of 3.17.1", ReplaceWith("[amount]% [stat] [in all cities] <while the empire is happy>"), DeprecationLevel.WARNING)
|
||||
StatPercentBonusCitiesDeprecatedWhileEmpireHappy("[amount]% [stat] while the empire is happy", UniqueTarget.Global),
|
||||
|
||||
StatPercentFromReligionFollowers("[amount]% [stat] from every follower, up to [amount]%", UniqueTarget.FollowerBelief, UniqueTarget.Global),
|
||||
StatPercentFromReligionFollowers("[amount]% [stat] from every follower, up to [amount]%", UniqueTarget.FollowerBelief),
|
||||
|
||||
//endregion Stat providing uniques
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user