Skip to content

Commit

Permalink
Resolved #12378 - Added stat categories for buildings in the construc…
Browse files Browse the repository at this point in the history
…tion list
  • Loading branch information
yairm210 committed Jan 29, 2025
1 parent 2c7282a commit 46613f8
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,14 @@ class CityConstructionsTable(private val cityScreen: CityScreen) {
val resourceTable = Table().apply { isTransform = false }

val textColor = if (constructionButtonDTO.rejectionReason == null) Color.WHITE else Color.RED
constructionTable.add(construction.name.toLabel(fontColor = textColor, hideIcons = true).apply { wrap=true })

val statIcons = if (construction is Building)
" " + Stat.entries.filter { construction.isStatRelated(it, cityScreen.city) }.map { it.character }.joinToString("")
else ""

val constructionNameText = "${construction.name.tr(hideIcons = true)}$statIcons"

constructionTable.add(constructionNameText.toLabel(fontColor = textColor, hideIcons = true).apply { wrap=true })
.width(cityScreen.stage.width/5).expandX().left().row()

resourceTable.add(constructionButtonDTO.buttonText.toLabel()).expandX().left()
Expand Down

0 comments on commit 46613f8

Please sign in to comment.