mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 21:03:15 -04: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",
|
"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 =
|
Food =
|
||||||
|
|
||||||
Crop Yield =
|
Crop Yield =
|
||||||
Land =
|
Territory =
|
||||||
Force =
|
Force =
|
||||||
GOLDEN AGE =
|
GOLDEN AGE =
|
||||||
Golden Age =
|
Golden Age =
|
||||||
@ -882,6 +882,7 @@ Composite Bowman =
|
|||||||
Foreign Land =
|
Foreign Land =
|
||||||
Friendly Land =
|
Friendly Land =
|
||||||
Air =
|
Air =
|
||||||
|
Land =
|
||||||
Wounded =
|
Wounded =
|
||||||
Marine =
|
Marine =
|
||||||
Mobile SAM =
|
Mobile SAM =
|
||||||
|
@ -394,10 +394,10 @@ class CivilizationInfo {
|
|||||||
fun getStatForRanking(category: RankingType): Int {
|
fun getStatForRanking(category: RankingType): Int {
|
||||||
return when (category) {
|
return when (category) {
|
||||||
RankingType.Population -> cities.sumBy { it.population.population }
|
RankingType.Population -> cities.sumBy { it.population.population }
|
||||||
RankingType.CropYield -> statsForNextTurn.food.roundToInt()
|
RankingType.Crop_Yield -> statsForNextTurn.food.roundToInt()
|
||||||
RankingType.Production -> statsForNextTurn.production.roundToInt()
|
RankingType.Production -> statsForNextTurn.production.roundToInt()
|
||||||
RankingType.Gold -> gold
|
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.Force -> units.sumBy { it.baseUnit.strength }
|
||||||
RankingType.Happiness -> getHappiness()
|
RankingType.Happiness -> getHappiness()
|
||||||
RankingType.Technologies -> tech.researchedTechnologies.size
|
RankingType.Technologies -> tech.researchedTechnologies.size
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.unciv.ui.victoryscreen
|
package com.unciv.ui.victoryscreen
|
||||||
|
|
||||||
enum class RankingType (val value: String) {
|
enum class RankingType {
|
||||||
Population("Population"),
|
Population,
|
||||||
CropYield("Crop Yield"),
|
Crop_Yield,
|
||||||
Production("Production"),
|
Production,
|
||||||
Gold("Gold"),
|
Gold,
|
||||||
Land("Land"),
|
Territory,
|
||||||
Force("Force"),
|
Force,
|
||||||
Happiness("Happiness"),
|
Happiness,
|
||||||
Technologies("Technologies"),
|
Technologies,
|
||||||
Culture("Culture")
|
Culture
|
||||||
}
|
}
|
@ -247,7 +247,7 @@ class VictoryScreen(val worldScreen: WorldScreen) : PickerScreen() {
|
|||||||
|
|
||||||
for (category in RankingType.values()) {
|
for (category in RankingType.values()) {
|
||||||
val column = Table().apply { defaults().pad(5f) }
|
val column = Table().apply { defaults().pad(5f) }
|
||||||
column.add(category.value.toLabel()).row()
|
column.add(category.name.replace('_',' ').toLabel()).row()
|
||||||
column.addSeparator()
|
column.addSeparator()
|
||||||
|
|
||||||
for (civ in majorCivs.sortedByDescending { it.getStatForRanking(category) }) {
|
for (civ in majorCivs.sortedByDescending { it.getStatForRanking(category) }) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user