Ranking by culture is by number of adopted policies

This commit is contained in:
Yair Morgenstern
2020-03-05 22:28:51 +02:00
parent 955dff89b9
commit 82ab66ad05
2 changed files with 3 additions and 5 deletions

View File

@ -339,7 +339,7 @@ class CivilizationInfo {
RankingType.Force -> units.sumBy { it.baseUnit.strength }
RankingType.Happiness -> getHappiness()
RankingType.Technologies -> tech.researchedTechnologies.size
RankingType.Culture -> policies.storedCulture
RankingType.Culture -> policies.numberOfAdoptedPolicies
}
}

View File

@ -39,9 +39,7 @@ open class Popup(val screen: CameraStageBaseScreen): Table(CameraStageBaseScreen
open fun close() {
remove()
if (screen.popups.isNotEmpty()) {
screen.popups[0].isVisible = true;
}
if (screen.popups.isNotEmpty()) screen.popups[0].isVisible = true
}
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 }
val CameraStageBaseScreen.popups: List<Popup>
get() = stage.actors.filter{ it is Popup }.map{ it as Popup }
get() = stage.actors.filterIsInstance<Popup>()