mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-25 10:26:05 +07:00
Fix a few applications of the "hidden from users" modifer (#11186)
* Respect hidden modifier in a nation's unique improvements display * Respect hidden modifier in the Unhappiness stat overview * No auto-icons for an ExpanderTab title
This commit is contained in:
parent
6092702f96
commit
84902b7957
@ -253,8 +253,10 @@ class Nation : RulesetObject() {
|
||||
)
|
||||
}
|
||||
}
|
||||
for (unique in improvement.uniques)
|
||||
for (unique in improvement.uniqueObjects) {
|
||||
if (unique.isHiddenToUsers()) continue
|
||||
yield(FormattedLine(unique, indent = 1))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ class ExpanderTab(
|
||||
}
|
||||
|
||||
val header = Table(skin) // Header with label and icon, touchable to show/hide
|
||||
private val headerLabel = title.toLabel(fontSize = fontSize)
|
||||
private val headerLabel = title.toLabel(fontSize = fontSize, hideIcons = true)
|
||||
private val headerIcon = ImageGetter.getImage(arrowImage)
|
||||
private val contentWrapper = Table() // Wrapper for innerTable, this is what will be shown/hidden
|
||||
|
||||
|
@ -137,10 +137,11 @@ class StatsOverviewTab(
|
||||
uniques = sequenceOf(
|
||||
UniqueType.ConditionalBetweenHappiness,
|
||||
UniqueType.ConditionalBelowHappiness
|
||||
).flatMap { conditional ->
|
||||
viewingPlayer.getTriggeredUniques(conditional)
|
||||
).flatMap { conditionalType ->
|
||||
viewingPlayer.getTriggeredUniques(conditionalType)
|
||||
.sortedBy { it.type } // otherwise order might change as a HashMap is involved
|
||||
}.toSet()
|
||||
}.filterNot { it.isHiddenToUsers() }
|
||||
.toSet()
|
||||
show = uniques.isNotEmpty()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user