mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 01:39:40 +07:00
Ranking by culture is by number of adopted policies
This commit is contained in:
@ -339,7 +339,7 @@ class CivilizationInfo {
|
|||||||
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
|
||||||
RankingType.Culture -> policies.storedCulture
|
RankingType.Culture -> policies.numberOfAdoptedPolicies
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,9 +39,7 @@ open class Popup(val screen: CameraStageBaseScreen): Table(CameraStageBaseScreen
|
|||||||
|
|
||||||
open fun close() {
|
open fun close() {
|
||||||
remove()
|
remove()
|
||||||
if (screen.popups.isNotEmpty()) {
|
if (screen.popups.isNotEmpty()) screen.popups[0].isVisible = true
|
||||||
screen.popups[0].isVisible = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addGoodSizedLabel(text: String, size:Int=18): Cell<Label> {
|
fun addGoodSizedLabel(text: String, size:Int=18): Cell<Label> {
|
||||||
@ -71,5 +69,5 @@ open class Popup(val screen: CameraStageBaseScreen): Table(CameraStageBaseScreen
|
|||||||
fun CameraStageBaseScreen.hasOpenPopups(): Boolean = stage.actors.any { it is Popup && it.isVisible }
|
fun CameraStageBaseScreen.hasOpenPopups(): Boolean = stage.actors.any { it is Popup && it.isVisible }
|
||||||
|
|
||||||
val CameraStageBaseScreen.popups: List<Popup>
|
val CameraStageBaseScreen.popups: List<Popup>
|
||||||
get() = stage.actors.filter{ it is Popup }.map{ it as Popup }
|
get() = stage.actors.filterIsInstance<Popup>()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user