mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-26 15:49:14 +07:00
Resolved #11340 - rare crash on city-state diplomatic relationship update
This commit is contained in:
@ -461,7 +461,7 @@ class CityStateFunctions(val civInfo: Civilization) {
|
|||||||
// Check if city-state invaded by other civs
|
// Check if city-state invaded by other civs
|
||||||
if (getNumThreateningBarbarians() > 0) return // Assume any players are there to fight barbarians
|
if (getNumThreateningBarbarians() > 0) return // Assume any players are there to fight barbarians
|
||||||
|
|
||||||
for (otherCiv in civInfo.getKnownCivs().filter { it.isMajorCiv() }) {
|
for (otherCiv in civInfo.getKnownCivs().filter { it.isMajorCiv() }.toList()) {
|
||||||
if (civInfo.isAtWarWith(otherCiv)) continue
|
if (civInfo.isAtWarWith(otherCiv)) continue
|
||||||
if (otherCiv.hasUnique(UniqueType.CityStateTerritoryAlwaysFriendly)) continue
|
if (otherCiv.hasUnique(UniqueType.CityStateTerritoryAlwaysFriendly)) continue
|
||||||
val diplomacy = civInfo.getDiplomacyManager(otherCiv)
|
val diplomacy = civInfo.getDiplomacyManager(otherCiv)
|
||||||
|
Reference in New Issue
Block a user