mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Display resource uniques in civilopedia
This commit is contained in:
parent
31f6a406c2
commit
3c56319640
@ -5,6 +5,7 @@ import com.unciv.logic.map.tile.Tile
|
|||||||
import com.unciv.models.ruleset.Belief
|
import com.unciv.models.ruleset.Belief
|
||||||
import com.unciv.models.ruleset.Ruleset
|
import com.unciv.models.ruleset.Ruleset
|
||||||
import com.unciv.models.ruleset.RulesetStatsObject
|
import com.unciv.models.ruleset.RulesetStatsObject
|
||||||
|
import com.unciv.models.ruleset.unique.UniqueFlag
|
||||||
import com.unciv.models.ruleset.unique.UniqueTarget
|
import com.unciv.models.ruleset.unique.UniqueTarget
|
||||||
import com.unciv.models.ruleset.unique.UniqueType
|
import com.unciv.models.ruleset.unique.UniqueType
|
||||||
import com.unciv.models.stats.Stats
|
import com.unciv.models.stats.Stats
|
||||||
@ -41,6 +42,14 @@ class TileResource : RulesetStatsObject() {
|
|||||||
textList += FormattedLine("${resourceType.name} resource", header = 4, color = resourceType.color)
|
textList += FormattedLine("${resourceType.name} resource", header = 4, color = resourceType.color)
|
||||||
textList += FormattedLine()
|
textList += FormattedLine()
|
||||||
|
|
||||||
|
if (uniques.any()){
|
||||||
|
textList += FormattedLine()
|
||||||
|
for (unique in uniqueObjects.sortedBy { it.text }) {
|
||||||
|
if (unique.hasFlag(UniqueFlag.HiddenToUsers)) continue
|
||||||
|
textList += FormattedLine(unique)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
textList += FormattedLine(cloneStats().toString())
|
textList += FormattedLine(cloneStats().toString())
|
||||||
|
|
||||||
if (terrainsCanBeFoundOn.isNotEmpty()) {
|
if (terrainsCanBeFoundOn.isNotEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user