Distinguished notifications of "trade item TO nation has ended" from "trade item FROM nation has ended"

This commit is contained in:
Yair Morgenstern
2019-10-31 15:55:13 +02:00
parent ff731a9c1a
commit 78027ef249
4 changed files with 12 additions and 6 deletions

View File

@ -621,6 +621,10 @@
Russian:"Предложение [tradeOffer] из [otherCivName] завершилось",
Czech:"[tradeOffer] s civilizací [otherCivName] je u konce."
}
"[tradeOffer] to [otherCivName] has ended":{
}
"One of our trades with [nation] has ended": {

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.app"
minSdkVersion 14
targetSdkVersion 29
versionCode 316
versionName "3.1.11"
versionCode 317
versionName "3.1.12"
}
// Had to add this crap for Travis to build, it wanted to sign the app

View File

@ -248,7 +248,9 @@ class DiplomacyManager() {
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(offer in trade.theirOffers)
civInfo.addNotification("[" + offer.name + "] from [$otherCivName] has ended", null, Color.GOLD)
else civInfo.addNotification("[" + offer.name + "] to [$otherCivName] has ended", null, Color.GOLD)
civInfo.updateStatsForNextTurn() // if they were bringing us gold per turn
civInfo.updateDetailedCivResources() // if they were giving us resources

View File

@ -43,9 +43,9 @@ class Translations : HashMap<String, TranslationEntry>(){
fun getLanguages(): List<String> {
val toReturn = mutableListOf<String>()
for(value in values)
for(key in keys)
if(!toReturn.contains(key)) toReturn.add(key)
for(entry in values)
for(languageName in entry.keys)
if(!toReturn.contains(languageName)) toReturn.add(languageName)
toReturn.remove("Japanese") // These were for tests but were never actually seriously translated
toReturn.remove("Thai")