mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-05 15:59:50 +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:
@ -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))
|
yield(FormattedLine(unique, indent = 1))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class ExpanderTab(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val header = Table(skin) // Header with label and icon, touchable to show/hide
|
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 headerIcon = ImageGetter.getImage(arrowImage)
|
||||||
private val contentWrapper = Table() // Wrapper for innerTable, this is what will be shown/hidden
|
private val contentWrapper = Table() // Wrapper for innerTable, this is what will be shown/hidden
|
||||||
|
|
||||||
|
@ -137,10 +137,11 @@ class StatsOverviewTab(
|
|||||||
uniques = sequenceOf(
|
uniques = sequenceOf(
|
||||||
UniqueType.ConditionalBetweenHappiness,
|
UniqueType.ConditionalBetweenHappiness,
|
||||||
UniqueType.ConditionalBelowHappiness
|
UniqueType.ConditionalBelowHappiness
|
||||||
).flatMap { conditional ->
|
).flatMap { conditionalType ->
|
||||||
viewingPlayer.getTriggeredUniques(conditional)
|
viewingPlayer.getTriggeredUniques(conditionalType)
|
||||||
.sortedBy { it.type } // otherwise order might change as a HashMap is involved
|
.sortedBy { it.type } // otherwise order might change as a HashMap is involved
|
||||||
}.toSet()
|
}.filterNot { it.isHiddenToUsers() }
|
||||||
|
.toSet()
|
||||||
show = uniques.isNotEmpty()
|
show = uniques.isNotEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user