mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-25 22:18:50 +07:00
Differentiated between 'Land' as in 'Land unit' and 'Territory' for rankings
This commit is contained in:
parent
6e9f868cb3
commit
881a885c14
@ -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"],
|
||||
}
|
||||
]
|
||||
},{
|
||||
|
@ -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 =
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
@ -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) }) {
|
||||
|
Loading…
Reference in New Issue
Block a user