From 375c39c61e78f8ddfaa4bddb58c815cbad69de6e Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 30 Jan 2020 19:17:12 +0200 Subject: [PATCH] Fixed crash in city-state influence notification --- .../unciv/logic/civilization/diplomacy/DiplomacyManager.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index 24a6153bd5..cb7d600629 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -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() {