Terrain civilopedia displays improvements that can be placed there

This commit is contained in:
yairm210 2024-07-18 17:51:54 +03:00
parent 147fdb24fa
commit acb1096615

View File

@ -97,6 +97,15 @@ class Terrain : RulesetStatsObject() {
}
}
val improvementsThatCanBePlacedHere = ruleset.tileImprovements.values
.filter { it.terrainsCanBeBuiltOn.contains(name) }
if (improvementsThatCanBePlacedHere.isNotEmpty()){
textList += FormattedLine("{Tile Improvements}:")
for (improvement in improvementsThatCanBePlacedHere){
textList += FormattedLine(improvement.name, improvement.makeLink(), indent=1)
}
}
if (turnsInto != null) {
textList += FormattedLine("Placed on [$turnsInto]", link="Terrain/$turnsInto")
}