From ee1663c51d9c9a903b92920644f7aaf563ffdd05 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Fri, 12 Jul 2024 00:04:20 +0300 Subject: [PATCH] Don't show deprecated uniques --- core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt b/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt index a73e64ac6f12c..a27e5cba6924a 100644 --- a/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt +++ b/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt @@ -121,7 +121,8 @@ class UniqueTable(isMainUnique: Boolean, val ruleset: Ruleset, stage: Stage, ) { val selected = UniqueTarget.entries.first { it.name == uniqueTargetsSelectBox.selected.value } val uniquesForTarget = UniqueType.entries.filter { it.canAcceptUniqueTarget(selected) } - val uniqueSelectBox = TranslatedSelectBox(uniquesForTarget.map { it.name }, uniquesForTarget.first().name) + val uniqueSelectBox = TranslatedSelectBox(uniquesForTarget.filter { it.getDeprecationAnnotation() == null } + .map { it.name }, uniquesForTarget.first().name) uniqueSelectBox.onChange { onUniqueSelected(uniqueSelectBox, uniqueTextField, ruleset, parameterSelectBoxTable) }