From 144d53b6df6af1ba9d29ec758bb19f7f0ab99c3e Mon Sep 17 00:00:00 2001 From: proteus-anguinus Date: Wed, 25 Mar 2020 21:24:41 +0100 Subject: [PATCH] Civilopedia: Improvement: show bonus for improvingTech (#2261) * Civilopedia improvement techupgrade * Fixed overzealous cleanup * 3 Languages for the new line --- android/assets/jsons/translations/French.properties | 1 + android/assets/jsons/translations/German.properties | 1 + android/assets/jsons/translations/Spanish.properties | 1 + android/assets/jsons/translations/template.properties | 1 + core/src/com/unciv/models/ruleset/tile/TileImprovement.kt | 7 ++++++- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/android/assets/jsons/translations/French.properties b/android/assets/jsons/translations/French.properties index 2c1ceefbee..bfb9fd5983 100644 --- a/android/assets/jsons/translations/French.properties +++ b/android/assets/jsons/translations/French.properties @@ -785,6 +785,7 @@ Available for [unitTypes] = Disponible pour [unitTypes] Free promotion: = Promotion gratuite: Free promotions: = Promocions gratuites: Free for [units] = Libre pour [units] +[bonus] with [tech] = [bonus] avec [tech] # Policies diff --git a/android/assets/jsons/translations/German.properties b/android/assets/jsons/translations/German.properties index 120026b884..ef35da7062 100644 --- a/android/assets/jsons/translations/German.properties +++ b/android/assets/jsons/translations/German.properties @@ -784,6 +784,7 @@ Available for [unitTypes] = Verfügbar für [unitTypes] Free promotion: = Freie Beförderung: Free promotions: = Freie Beförderungen: Free for [units] = Frei für [units] +[bonus] with [tech] = [bonus] mit [tech] # Policies diff --git a/android/assets/jsons/translations/Spanish.properties b/android/assets/jsons/translations/Spanish.properties index 0c973d40c7..97fbf5a3d4 100644 --- a/android/assets/jsons/translations/Spanish.properties +++ b/android/assets/jsons/translations/Spanish.properties @@ -875,6 +875,7 @@ Available for [unitTypes] = Disponible para [unitTypes] Free promotion: = Ascenso libre: Free promotions: = Ascensos libres: Free for [units] = Libre para [units] +[bonus] with [tech] = [bonus] con [tech] # Policies diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 626d125d38..c1da8271a1 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -783,6 +783,7 @@ Available for [unitTypes] = Free promotion: = Free promotions: = Free for [units] = +[bonus] with [tech] = # Policies diff --git a/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt b/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt index 1de39a29e7..666f02bb68 100644 --- a/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt +++ b/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt @@ -32,7 +32,12 @@ class TileImprovement : NamedStats() { fun getDescription(ruleset: Ruleset, forPickerScreen: Boolean = true): String { val stringBuilder = StringBuilder() - if (this.clone().toString().isNotEmpty()) stringBuilder.appendln(this.clone().toString()) + val statsDesc = this.clone().toString() + if (statsDesc.isNotEmpty()) stringBuilder.appendln(statsDesc) + if (improvingTech != null && improvingTechStats != null) { + val improveStatsDesc = improvingTechStats.toString() + if (improveStatsDesc.isNotEmpty()) stringBuilder.appendln("[$improveStatsDesc] with [${improvingTech!!}]".tr()) + } if (uniqueTo!=null && !forPickerScreen) stringBuilder.appendln("Unique to [$uniqueTo]".tr()) if (!terrainsCanBeBuiltOn.isEmpty()) { val terrainsCanBeBuiltOnString: ArrayList = arrayListOf()