Differentiated between 'Land' as in 'Land unit' and 'Territory' for rankings

This commit is contained in:
Yair Morgenstern 2021-04-13 00:13:17 +03:00
parent 6e9f868cb3
commit 881a885c14
5 changed files with 16 additions and 15 deletions

View File

@ -127,7 +127,7 @@
},
{
"name": "Honor Complete",
"uniques": ["Earn [10]% of [military] opponent's [Cost] as [Gold] for kills"],
"uniques": ["Earn [10]% of [Military] opponent's [Cost] as [Gold] for kills"],
}
]
},{

View File

@ -510,7 +510,7 @@ Culture =
Food =
Crop Yield =
Land =
Territory =
Force =
GOLDEN AGE =
Golden Age =
@ -882,6 +882,7 @@ Composite Bowman =
Foreign Land =
Friendly Land =
Air =
Land =
Wounded =
Marine =
Mobile SAM =

View File

@ -394,10 +394,10 @@ class CivilizationInfo {
fun getStatForRanking(category: RankingType): Int {
return when (category) {
RankingType.Population -> cities.sumBy { it.population.population }
RankingType.CropYield -> statsForNextTurn.food.roundToInt()
RankingType.Crop_Yield -> statsForNextTurn.food.roundToInt()
RankingType.Production -> statsForNextTurn.production.roundToInt()
RankingType.Gold -> gold
RankingType.Land -> cities.sumBy { it.tiles.size }
RankingType.Territory -> cities.sumBy { it.tiles.size }
RankingType.Force -> units.sumBy { it.baseUnit.strength }
RankingType.Happiness -> getHappiness()
RankingType.Technologies -> tech.researchedTechnologies.size

View File

@ -1,13 +1,13 @@
package com.unciv.ui.victoryscreen
enum class RankingType (val value: String) {
Population("Population"),
CropYield("Crop Yield"),
Production("Production"),
Gold("Gold"),
Land("Land"),
Force("Force"),
Happiness("Happiness"),
Technologies("Technologies"),
Culture("Culture")
enum class RankingType {
Population,
Crop_Yield,
Production,
Gold,
Territory,
Force,
Happiness,
Technologies,
Culture
}

View File

@ -247,7 +247,7 @@ class VictoryScreen(val worldScreen: WorldScreen) : PickerScreen() {
for (category in RankingType.values()) {
val column = Table().apply { defaults().pad(5f) }
column.add(category.value.toLabel()).row()
column.add(category.name.replace('_',' ').toLabel()).row()
column.addSeparator()
for (civ in majorCivs.sortedByDescending { it.getStatForRanking(category) }) {