Fixed crash in city-state influence notification

This commit is contained in:
Yair Morgenstern
2020-01-30 19:17:12 +02:00
parent b29813b389
commit 375c39c61e

View File

@ -282,11 +282,12 @@ class DiplomacyManager() {
influence = min(restingPoint, influence + increment)
else influence = restingPoint
val civCapitalLocation = if(civInfo.cities.isNotEmpty()) civInfo.getCapital().location else null
if (getTurnsToRelationshipChange() == 1)
otherCiv().addNotification("Your relationship with [${civInfo.civName}] is about to degrade", civInfo.getCapital().location, Color.GOLD)
otherCiv().addNotification("Your relationship with [${civInfo.civName}] is about to degrade", civCapitalLocation, Color.GOLD)
if (initialRelationshipLevel >= RelationshipLevel.Friend && initialRelationshipLevel != relationshipLevel())
otherCiv().addNotification("Your relationship with [${civInfo.civName}] degraded", civInfo.getCapital().location, Color.GOLD)
otherCiv().addNotification("Your relationship with [${civInfo.civName}] degraded", civCapitalLocation, Color.GOLD)
}
private fun nextTurnFlags() {