Order defeated civs after alive civs even if the alive civs score is negative (e.g. for happiness) (#9203)

This commit is contained in:
WhoIsJohannes
2023-04-17 06:38:43 +02:00
committed by GitHub
parent dbb46545f5
commit b9a7925285
2 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,8 @@ class VictoryScreenCharts(
val sortedCivs = gameInfo.civilizations.asSequence()
.filter { it.isMajorCiv() }
.map { VictoryScreen.CivWithStat(it, rankingType) }
.sortedByDescending { it.value }
.sortedBy { it.civ.civName }
.sortedByDescending { if(it.civ.isDefeated()) Int.MIN_VALUE else it.value }
for (civEntry in sortedCivs) {
if (civEntry.civ != selectedCiv) civButtonsTable.add()
else civButtonsTable.add(markerIcon).size(24f).right()

View File

@ -34,7 +34,8 @@ class VictoryScreenCivRankings(
val column = Table().apply { defaults().space(10f) }
val civData = majorCivs
.map { VictoryScreen.CivWithStat(it, category) }
.sortedByDescending { it.value }
.sortedBy { it.civ.civName }
.sortedByDescending { if(it.civ.isDefeated()) Int.MIN_VALUE else it.value }
for (civEntry in civData) {
column.add(VictoryScreenCivGroup(civEntry, worldScreen.viewingCiv)).fillX().row()
}