From 7752e1834d7a0a5ea5da0ea19245e33320ac7a16 Mon Sep 17 00:00:00 2001 From: Xander Lenstra <71121390+xlenstra@users.noreply.github.com> Date: Wed, 6 Oct 2021 16:06:49 +0200 Subject: [PATCH] Added a label displaying religion is off when it is off (#5412) --- android/assets/jsons/translations/template.properties | 1 + core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt | 3 +-- core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 0296e11b40..1a743e6cb8 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -1104,6 +1104,7 @@ Founding Civ: = Holy City: = Cities following this religion: = Click an icon to see the stats of this religion = +Religion: Off = # Terrains diff --git a/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt b/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt index 90c0838163..ca1f813483 100644 --- a/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt @@ -150,8 +150,7 @@ class GameOptionsTable( private fun Table.addEraSelectBox() { if (ruleset.technologies.isEmpty()) return // mod with no techs - // Should eventually be changed to use eras.json, but we'll keep it like this for now for mod compatibility - val eras = ruleset.technologies.values.filter { !it.uniques.contains("Starting tech") }.map { it.era() }.distinct() + val eras = ruleset.eras.keys addSelectBox("{Starting Era}:", eras, gameParameters.startingEra) { gameParameters.startingEra = it } } diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt index 38825dff51..a1b45866aa 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt @@ -136,6 +136,8 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() { faithLabel.onClick(invokeFaithOverview) faithImage.onClick(invokeFaithOverview) + } else { + statsTable.add("Religion: Off".toLabel()).padLeft(20f) } statsTable.pack()