mirror of
https://github.com/yairm210/Unciv.git
synced 2025-10-03 08:56:17 -04:00
Trade ending notification (#8925)
* Notification of the end of a trade in 3 and 1 turns * Notification about the loss of an alliance is not shown if the city state is captured. * Shortened
This commit is contained in:
parent
a4aa5b7b5a
commit
5ee3df96c8
@ -894,6 +894,8 @@ You and [name] are no longer allies! =
|
|||||||
[civName] has denied your trade request =
|
[civName] has denied your trade request =
|
||||||
[tradeOffer] from [otherCivName] has ended =
|
[tradeOffer] from [otherCivName] has ended =
|
||||||
[tradeOffer] to [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 ended =
|
||||||
One of our trades with [nation] has been cut short =
|
One of our trades with [nation] has been cut short =
|
||||||
[nation] agreed to stop settling cities near us! =
|
[nation] agreed to stop settling cities near us! =
|
||||||
|
@ -263,7 +263,7 @@ class CityStateFunctions(val civInfo: Civilization) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (oldAllyName != null) {
|
if (oldAllyName != null && civInfo.isAlive()) {
|
||||||
val oldAllyCiv = civInfo.gameInfo.getCivilization(oldAllyName)
|
val oldAllyCiv = civInfo.gameInfo.getCivilization(oldAllyName)
|
||||||
val text = "We have lost alliance with [${civInfo.civName}]."
|
val text = "We have lost alliance with [${civInfo.civName}]."
|
||||||
if (capitalLocation != null) oldAllyCiv.addNotification(text, capitalLocation,
|
if (capitalLocation != null) oldAllyCiv.addNotification(text, capitalLocation,
|
||||||
|
@ -573,6 +573,14 @@ class DiplomacyManager() : IsPartOfGameInfoSerialization {
|
|||||||
civInfo.cache.updateCivResources()
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user