mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 21:30:20 +07:00
Resolved #5930 - removed extraneous stat icons + resolved sorting problem they caused in Civilopedia tutorials. (#5959)
This commit is contained in:
@ -45,7 +45,7 @@ data class TradeOffer(val name:String, val type:TradeType, var amount:Int = 1, v
|
||||
}.tr()
|
||||
|
||||
if (type.numberType == TradeTypeNumberType.Simple || name == Constants.researchAgreement) offerText += " ($amount)"
|
||||
else if (type.numberType == TradeTypeNumberType.Gold) offerText += " ($amount${Fonts.gold})"
|
||||
else if (type.numberType == TradeTypeNumberType.Gold) offerText += " ($amount)"
|
||||
|
||||
if (duration > 0) offerText += "\n" + duration + Fonts.turn
|
||||
|
||||
|
@ -107,7 +107,9 @@ class CivilopediaScreen(
|
||||
// Alphabetical order of localized names, using system default locale
|
||||
entries = entries.sortedWith(
|
||||
compareBy<CivilopediaEntry>{ it.sortBy }
|
||||
.thenBy (UncivGame.Current.settings.getCollatorFromLocale(), { it.name.tr() })
|
||||
.thenBy (UncivGame.Current.settings.getCollatorFromLocale(), {
|
||||
// In order for the extra icons on Happiness and Faith to not affect sort order
|
||||
it.name.tr().replace(Fonts.happiness.toString(),"").replace(Fonts.faith.toString(),"") })
|
||||
)
|
||||
|
||||
var currentY = -1f
|
||||
|
@ -25,10 +25,7 @@ class StatsOverviewTable (
|
||||
private fun getHappinessTable(): Table {
|
||||
val happinessTable = Table(BaseScreen.skin)
|
||||
happinessTable.defaults().pad(5f)
|
||||
val happinessHeader = Table(BaseScreen.skin)
|
||||
happinessHeader.add(ImageGetter.getStatIcon("Happiness")).pad(5f,0f,5f,12f).size(20f)
|
||||
happinessHeader.add("Happiness".toLabel(fontSize = 24)).padTop(5f)
|
||||
happinessTable.add(happinessHeader).colspan(2).row()
|
||||
happinessTable.add("Happiness".toLabel(fontSize = 24)).colspan(2).row()
|
||||
happinessTable.addSeparator()
|
||||
|
||||
val happinessBreakdown = viewingPlayer.stats().getHappinessBreakdown()
|
||||
@ -46,10 +43,7 @@ class StatsOverviewTable (
|
||||
private fun getGoldTable(): Table {
|
||||
val goldTable = Table(BaseScreen.skin)
|
||||
goldTable.defaults().pad(5f)
|
||||
val goldHeader = Table(BaseScreen.skin)
|
||||
goldHeader.add(ImageGetter.getStatIcon("Gold")).pad(5f, 0f, 5f, 12f).size(20f)
|
||||
goldHeader.add("Gold".toLabel(fontSize = 24)).padTop(5f)
|
||||
goldTable.add(goldHeader).colspan(2).row()
|
||||
goldTable.add("Gold".toLabel(fontSize = 24)).colspan(2).row()
|
||||
goldTable.addSeparator()
|
||||
var total = 0f
|
||||
for (entry in viewingPlayer.stats().getStatMapForNextTurn()) {
|
||||
@ -84,10 +78,7 @@ class StatsOverviewTable (
|
||||
private fun getScienceTable(): Table {
|
||||
val scienceTable = Table(BaseScreen.skin)
|
||||
scienceTable.defaults().pad(5f)
|
||||
val scienceHeader = Table(BaseScreen.skin)
|
||||
scienceHeader.add(ImageGetter.getStatIcon("Science")).pad(5f,0f,5f,12f).size(20f)
|
||||
scienceHeader.add("Science".toLabel(fontSize = 24)).padTop(5f)
|
||||
scienceTable.add(scienceHeader).colspan(2).row()
|
||||
scienceTable.add("Science".toLabel(fontSize = 24)).colspan(2).row()
|
||||
scienceTable.addSeparator()
|
||||
val scienceStats = viewingPlayer.stats().getStatMapForNextTurn()
|
||||
.filter { it.value.science != 0f }
|
||||
|
Reference in New Issue
Block a user