mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-23 22:30:18 +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()
|
}.tr()
|
||||||
|
|
||||||
if (type.numberType == TradeTypeNumberType.Simple || name == Constants.researchAgreement) offerText += " ($amount)"
|
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
|
if (duration > 0) offerText += "\n" + duration + Fonts.turn
|
||||||
|
|
||||||
|
@ -107,7 +107,9 @@ class CivilopediaScreen(
|
|||||||
// Alphabetical order of localized names, using system default locale
|
// Alphabetical order of localized names, using system default locale
|
||||||
entries = entries.sortedWith(
|
entries = entries.sortedWith(
|
||||||
compareBy<CivilopediaEntry>{ it.sortBy }
|
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
|
var currentY = -1f
|
||||||
|
@ -25,10 +25,7 @@ class StatsOverviewTable (
|
|||||||
private fun getHappinessTable(): Table {
|
private fun getHappinessTable(): Table {
|
||||||
val happinessTable = Table(BaseScreen.skin)
|
val happinessTable = Table(BaseScreen.skin)
|
||||||
happinessTable.defaults().pad(5f)
|
happinessTable.defaults().pad(5f)
|
||||||
val happinessHeader = Table(BaseScreen.skin)
|
happinessTable.add("Happiness".toLabel(fontSize = 24)).colspan(2).row()
|
||||||
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.addSeparator()
|
happinessTable.addSeparator()
|
||||||
|
|
||||||
val happinessBreakdown = viewingPlayer.stats().getHappinessBreakdown()
|
val happinessBreakdown = viewingPlayer.stats().getHappinessBreakdown()
|
||||||
@ -46,10 +43,7 @@ class StatsOverviewTable (
|
|||||||
private fun getGoldTable(): Table {
|
private fun getGoldTable(): Table {
|
||||||
val goldTable = Table(BaseScreen.skin)
|
val goldTable = Table(BaseScreen.skin)
|
||||||
goldTable.defaults().pad(5f)
|
goldTable.defaults().pad(5f)
|
||||||
val goldHeader = Table(BaseScreen.skin)
|
goldTable.add("Gold".toLabel(fontSize = 24)).colspan(2).row()
|
||||||
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.addSeparator()
|
goldTable.addSeparator()
|
||||||
var total = 0f
|
var total = 0f
|
||||||
for (entry in viewingPlayer.stats().getStatMapForNextTurn()) {
|
for (entry in viewingPlayer.stats().getStatMapForNextTurn()) {
|
||||||
@ -84,10 +78,7 @@ class StatsOverviewTable (
|
|||||||
private fun getScienceTable(): Table {
|
private fun getScienceTable(): Table {
|
||||||
val scienceTable = Table(BaseScreen.skin)
|
val scienceTable = Table(BaseScreen.skin)
|
||||||
scienceTable.defaults().pad(5f)
|
scienceTable.defaults().pad(5f)
|
||||||
val scienceHeader = Table(BaseScreen.skin)
|
scienceTable.add("Science".toLabel(fontSize = 24)).colspan(2).row()
|
||||||
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.addSeparator()
|
scienceTable.addSeparator()
|
||||||
val scienceStats = viewingPlayer.stats().getStatMapForNextTurn()
|
val scienceStats = viewingPlayer.stats().getStatMapForNextTurn()
|
||||||
.filter { it.value.science != 0f }
|
.filter { it.value.science != 0f }
|
||||||
|
Reference in New Issue
Block a user