diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 95eaa425c3..21de6cb3e5 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -894,6 +894,8 @@ You and [name] are no longer allies! = [civName] has denied your trade request = [tradeOffer] from [otherCivName] has ended = [tradeOffer] to [otherCivName] has ended = +[tradeOffer] from [otherCivName] will end in [amount] turns = +[tradeOffer] from [otherCivName] will end next turn = One of our trades with [nation] has ended = One of our trades with [nation] has been cut short = [nation] agreed to stop settling cities near us! = diff --git a/core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt b/core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt index 9f56ade8eb..4405452b28 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt @@ -263,7 +263,7 @@ class CityStateFunctions(val civInfo: Civilization) { } } } - if (oldAllyName != null) { + if (oldAllyName != null && civInfo.isAlive()) { val oldAllyCiv = civInfo.gameInfo.getCivilization(oldAllyName) val text = "We have lost alliance with [${civInfo.civName}]." if (capitalLocation != null) oldAllyCiv.addNotification(text, capitalLocation, diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index 705e2ef528..e3cd79926d 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -573,6 +573,14 @@ class DiplomacyManager() : IsPartOfGameInfoSerialization { civInfo.cache.updateCivResources() } } + + for (offer in trade.theirOffers.filter { it.duration <= 3 }) + { + if (offer.duration == 3) + civInfo.addNotification("[${offer.name}] from [$otherCivName] will end in [3] turns", NotificationCategory.Trade, otherCivName, NotificationIcon.Trade) + else if (offer.duration == 1) + civInfo.addNotification("[${offer.name}] from [$otherCivName] will end next turn", NotificationCategory.Trade, otherCivName, NotificationIcon.Trade) + } } }