Skip to content

Commit

Permalink
Don't show deprecated uniques
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 committed Jul 11, 2024
1 parent 27ff008 commit ee1663c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit ee1663c

Please sign in to comment.