mirror of
https://github.com/yairm210/Unciv.git
synced 2025-10-03 00:45:19 -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()
|
tryUpdateRoadStatus()
|
||||||
}
|
}
|
||||||
|
@ -171,6 +171,7 @@ class CityInfoReligionManager {
|
|||||||
*/
|
*/
|
||||||
fun removeUnknownPantheons() {
|
fun removeUnknownPantheons() {
|
||||||
for (pressure in pressures) {
|
for (pressure in pressures) {
|
||||||
|
if (pressure.key == Constants.noReligionName) continue
|
||||||
val correspondingReligion = cityInfo.civInfo.gameInfo.religions[pressure.key]!!
|
val correspondingReligion = cityInfo.civInfo.gameInfo.religions[pressure.key]!!
|
||||||
if (correspondingReligion.isPantheon()
|
if (correspondingReligion.isPantheon()
|
||||||
&& correspondingReligion.foundingCivName != cityInfo.civInfo.civName
|
&& correspondingReligion.foundingCivName != cityInfo.civInfo.civName
|
||||||
|
Loading…
x
Reference in New Issue
Block a user