mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04:00
Resolved #880 - Notifications for end-of-trade no longer activate after instant trade
This commit is contained in:
parent
b0e43ace59
commit
27c83f1792
@ -219,12 +219,14 @@ class DiplomacyManager() {
|
|||||||
|
|
||||||
fun nextTurn(){
|
fun nextTurn(){
|
||||||
for(trade in trades.toList()){
|
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--
|
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 }) {
|
if(trade.ourOffers.all { it.duration<=0 } && trade.theirOffers.all { it.duration<=0 }) {
|
||||||
trades.remove(trade)
|
trades.remove(trade)
|
||||||
civInfo.addNotification("One of our trades with [$otherCivName] has ended!".tr(),null, Color.YELLOW)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
removeUntenebleTrades()
|
removeUntenebleTrades()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user