diff --git a/core/src/com/unciv/models/ruleset/Nation.kt b/core/src/com/unciv/models/ruleset/Nation.kt index 01c934a49f..472d4221df 100644 --- a/core/src/com/unciv/models/ruleset/Nation.kt +++ b/core/src/com/unciv/models/ruleset/Nation.kt @@ -256,7 +256,7 @@ class Nation : RulesetObject() { unique.text.tr(), indent = 1) } for (promotion in unit.promotions.filter { it !in originalUnit.promotions }) { - val effect = ruleset.unitPromotions[promotion]!!.uniquesWithEffect() + val effect = ruleset.unitPromotions[promotion]!!.uniques // "{$promotion} ({$effect})" won't work as effect may contain [] and tr() does not support that kind of nesting textList += FormattedLine( "${promotion.tr()} (${effect.joinToString(",") { it.tr() }})", diff --git a/core/src/com/unciv/models/ruleset/Ruleset.kt b/core/src/com/unciv/models/ruleset/Ruleset.kt index f0bf4b4e48..85cb254d09 100644 --- a/core/src/com/unciv/models/ruleset/Ruleset.kt +++ b/core/src/com/unciv/models/ruleset/Ruleset.kt @@ -409,12 +409,6 @@ class Ruleset { } for (promotion in unitPromotions.values) { - if (promotion.effect != "") - lines.add( - "`Promotion.effect` used in ${promotion.name} is deprecated, please use `uniques` instead", - RulesetErrorSeverity.WarningOptionsOnly - ) - checkUniques(promotion, lines, UniqueType.UniqueComplianceErrorSeverity.RulesetInvariant) } diff --git a/core/src/com/unciv/models/ruleset/unit/Promotion.kt b/core/src/com/unciv/models/ruleset/unit/Promotion.kt index ff025ec3a1..45fbe3579d 100644 --- a/core/src/com/unciv/models/ruleset/unit/Promotion.kt +++ b/core/src/com/unciv/models/ruleset/unit/Promotion.kt @@ -12,16 +12,8 @@ import com.unciv.ui.civilopedia.FormattedLine class Promotion : RulesetObject() { var prerequisites = listOf() - @Deprecated("As of 3.16.12", ReplaceWith("uniques")) - var effect = "" - var unitTypes = listOf() // The json parser wouldn't agree to deserialize this as a list of UnitTypes. =( - fun uniquesWithEffect() = sequence { - if (effect.isNotEmpty()) yield(effect) - yieldAll(uniques) - } - override fun getUniqueTarget() = UniqueTarget.Promotion @@ -29,7 +21,7 @@ class Promotion : RulesetObject() { fun getDescription(promotionsForUnitType: Collection):String { val textList = ArrayList() - for (unique in uniquesWithEffect()) { + for (unique in uniques) { textList += unique.tr() }