mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 15:30:43 -04:00
Fixed crash from conquering cities (#4877)
This commit is contained in:
parent
df31fb2f05
commit
8d49a84f78
@ -216,7 +216,7 @@ class CityInfoConquestFunctions(val city: CityInfo){
|
||||
}
|
||||
}
|
||||
|
||||
religion.removeUnknownPantheons()
|
||||
if (civInfo.gameInfo.hasReligionEnabled()) religion.removeUnknownPantheons()
|
||||
|
||||
tryUpdateRoadStatus()
|
||||
}
|
||||
|
@ -171,6 +171,7 @@ class CityInfoReligionManager {
|
||||
*/
|
||||
fun removeUnknownPantheons() {
|
||||
for (pressure in pressures) {
|
||||
if (pressure.key == Constants.noReligionName) continue
|
||||
val correspondingReligion = cityInfo.civInfo.gameInfo.religions[pressure.key]!!
|
||||
if (correspondingReligion.isPantheon()
|
||||
&& correspondingReligion.foundingCivName != cityInfo.civInfo.civName
|
||||
|
Loading…
x
Reference in New Issue
Block a user