diff --git a/core/src/com/unciv/models/ruleset/unit/Promotion.kt b/core/src/com/unciv/models/ruleset/unit/Promotion.kt index fe802f7dc7..3a4850436d 100644 --- a/core/src/com/unciv/models/ruleset/unit/Promotion.kt +++ b/core/src/com/unciv/models/ruleset/unit/Promotion.kt @@ -88,18 +88,21 @@ class Promotion : RulesetObject() { val types = unitTypes.partition { it in ruleset.units } if (unitTypes.size == 1) { if (types.first.isNotEmpty()) - types.first.first().let { - textList += FormattedLine("Available for [${it.tr()}]", link = "Unit/$it") + unitTypes.first().let { + textList += FormattedLine("Available for [$it]", link = "Unit/$it") } else - textList += FormattedLine("Available for [${types.second.first().tr()}]") + unitTypes.first().let { + textList += FormattedLine("Available for [$it]", link = "UnitType/$it") + } + } else { textList += FormattedLine("Available for:") types.first.forEach { textList += FormattedLine(it, indent = 1, link = "Unit/$it") } types.second.forEach { - textList += FormattedLine(it, indent = 1) + textList += FormattedLine(it, indent = 1, link = "UnitType/$it") } } } diff --git a/core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt b/core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt index b768e6c94c..68c004c754 100644 --- a/core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt +++ b/core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt @@ -227,6 +227,13 @@ object BaseUnitDescriptions { if (unit.unitType != name) continue yield(FormattedLine(unit.name, unit.makeLink())) } + + val relevantPromotions = ruleset.unitPromotions.values.filter { it.unitTypes.contains(name) } + if (relevantPromotions.isNotEmpty()) { + yield(FormattedLine("Promotions", header = 4)) + for (promotion in relevantPromotions) + yield(FormattedLine(promotion.name, promotion.makeLink())) + } if (uniqueObjects.isNotEmpty()) { yield(FormattedLine(separator = true)) for (unique in uniqueObjects) {