mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
wonder text will not be displayed & "[] enabled:" will not show if nothing visible in list (#3399)
This commit is contained in:
parent
3e6955d0d9
commit
e80dc879bb
@ -47,7 +47,7 @@ class Technology {
|
|||||||
|
|
||||||
val viewingCiv = UncivGame.Current.worldScreen.viewingCiv
|
val viewingCiv = UncivGame.Current.worldScreen.viewingCiv
|
||||||
val enabledUnits = getEnabledUnits(viewingCiv)
|
val enabledUnits = getEnabledUnits(viewingCiv)
|
||||||
if (enabledUnits.isNotEmpty()) {
|
if (enabledUnits.any { "Will not be displayed in Civilopedia" !in it.uniques}) {
|
||||||
lineList += "{Units enabled}: "
|
lineList += "{Units enabled}: "
|
||||||
for (unit in enabledUnits
|
for (unit in enabledUnits
|
||||||
.filter { "Will not be displayed in Civilopedia" !in it.uniques})
|
.filter { "Will not be displayed in Civilopedia" !in it.uniques})
|
||||||
@ -57,7 +57,7 @@ class Technology {
|
|||||||
val enabledBuildings = getEnabledBuildings(viewingCiv)
|
val enabledBuildings = getEnabledBuildings(viewingCiv)
|
||||||
|
|
||||||
val regularBuildings = enabledBuildings.filter { !it.isWonder && !it.isNationalWonder }
|
val regularBuildings = enabledBuildings.filter { !it.isWonder && !it.isNationalWonder }
|
||||||
if (regularBuildings.isNotEmpty()) {
|
if (regularBuildings.any { "Will not be displayed in Civilopedia" !in it.uniques}) {
|
||||||
lineList += "{Buildings enabled}: "
|
lineList += "{Buildings enabled}: "
|
||||||
for (building in regularBuildings
|
for (building in regularBuildings
|
||||||
.filter { "Will not be displayed in Civilopedia" !in it.uniques})
|
.filter { "Will not be displayed in Civilopedia" !in it.uniques})
|
||||||
@ -65,9 +65,10 @@ class Technology {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val wonders = enabledBuildings.filter { it.isWonder || it.isNationalWonder }
|
val wonders = enabledBuildings.filter { it.isWonder || it.isNationalWonder }
|
||||||
if (wonders.isNotEmpty()) {
|
if (wonders.any { "Will not be displayed in Civilopedia" !in it.uniques }) {
|
||||||
lineList += "{Wonders enabled}: "
|
lineList += "{Wonders enabled}: "
|
||||||
for (wonder in wonders)
|
for (wonder in wonders
|
||||||
|
.filter { "Will not be displayed in Civilopedia" !in it.uniques})
|
||||||
lineList += " * " + wonder.name.tr() + " (" + wonder.getShortDescription(ruleset) + ")"
|
lineList += " * " + wonder.name.tr() + " (" + wonder.getShortDescription(ruleset) + ")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user