From 27c83f1792d0b6c11dcf6f31055437030581e796 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 19 Jun 2019 17:48:26 +0300 Subject: [PATCH] Resolved #880 - Notifications for end-of-trade no longer activate after instant trade --- .../unciv/logic/civilization/diplomacy/DiplomacyManager.kt | 6 ++++-- 1 file changed, 4 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 6d8b98f80c..ee2666b350 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -219,12 +219,14 @@ class DiplomacyManager() { fun nextTurn(){ for(trade in trades.toList()){ - for(offer in trade.ourOffers.union(trade.theirOffers).filter { it.duration>0 }) + for(offer in trade.ourOffers.union(trade.theirOffers).filter { it.duration>0 }) { offer.duration-- + if(offer.duration==0) + civInfo.addNotification("["+offer.name+"] from [$otherCivName] has ended",null, Color.GOLD) + } if(trade.ourOffers.all { it.duration<=0 } && trade.theirOffers.all { it.duration<=0 }) { trades.remove(trade) - civInfo.addNotification("One of our trades with [$otherCivName] has ended!".tr(),null, Color.YELLOW) } } removeUntenebleTrades()