From ae84d3f5c8b52c7da760e13dde69d22b1b6c97dd Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Thu, 1 Jul 2021 08:02:41 +0200 Subject: [PATCH] Relgion -> Religion (#4321) --- core/src/com/unciv/logic/GameInfo.kt | 2 +- core/src/com/unciv/logic/city/CityInfo.kt | 2 +- core/src/com/unciv/models/metadata/GameSettings.kt | 2 +- core/src/com/unciv/models/ruleset/Building.kt | 2 +- core/src/com/unciv/models/ruleset/tech/Technology.kt | 4 ++-- core/src/com/unciv/ui/cityscreen/CityStatsTable.kt | 2 +- core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt | 2 +- core/src/com/unciv/ui/overviewscreen/CityOverviewTable.kt | 2 +- core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt | 2 +- core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index f82d9aee87..3629eac570 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -412,7 +412,7 @@ class GameInfo { } } - fun hasRelgionEnabled() = gameParameters.religionEnabled || ruleSet.hasReligion() // Temporary function to check whether religion should be used for this game + fun hasReligionEnabled() = gameParameters.religionEnabled || ruleSet.hasReligion() // Temporary function to check whether religion should be used for this game } // reduced variant only for load preview diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index 9648cf19f1..f4370c8878 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -372,7 +372,7 @@ class CityInfo { } } else population.nextTurn(foodForNextTurn()) - if (civInfo.gameInfo.hasRelgionEnabled()) religion.getAffectedBySurroundingCities() + if (civInfo.gameInfo.hasReligionEnabled()) religion.getAffectedBySurroundingCities() if (this in civInfo.cities) { // city was not destroyed health = min(health + 20, getMaxHealth()) diff --git a/core/src/com/unciv/models/metadata/GameSettings.kt b/core/src/com/unciv/models/metadata/GameSettings.kt index 92e2930821..82f8f527a1 100644 --- a/core/src/com/unciv/models/metadata/GameSettings.kt +++ b/core/src/com/unciv/models/metadata/GameSettings.kt @@ -41,7 +41,7 @@ class GameSettings { var visualMods = HashSet() var showExperimentalWorldWrap = false // We're keeping this as a config due to ANR problems on Android phones for people who don't know what they're doing :/ - var showExperimentalRelgion = false + var showExperimentalReligion = false var lastOverviewPage: String = "Cities" diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index c99378c8e2..9fe54c851b 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -283,7 +283,7 @@ class Building : NamedStats(), IConstruction { "Can only be built in annexed cities" -> if (construction.cityInfo.isPuppet || construction.cityInfo.foundingCiv == "" || construction.cityInfo.civInfo.civName == construction.cityInfo.foundingCiv) return unique.text "Obsolete with []" -> if (civInfo.tech.isResearched(unique.params[0])) return unique.text - "Hidden when religion is disabled" -> if (!civInfo.gameInfo.hasRelgionEnabled()) return unique.text + "Hidden when religion is disabled" -> if (!civInfo.gameInfo.hasReligionEnabled()) return unique.text } if (uniqueTo != null && uniqueTo != civInfo.civName) return "Unique to $uniqueTo" diff --git a/core/src/com/unciv/models/ruleset/tech/Technology.kt b/core/src/com/unciv/models/ruleset/tech/Technology.kt index ece5e6ddcc..d0b1826851 100644 --- a/core/src/com/unciv/models/ruleset/tech/Technology.kt +++ b/core/src/com/unciv/models/ruleset/tech/Technology.kt @@ -47,7 +47,7 @@ class Technology { val regularBuildings = enabledBuildings.filter { !it.isWonder && !it.isNationalWonder && "Will not be displayed in Civilopedia" !in it.uniques - && !(!viewingCiv.gameInfo.hasRelgionEnabled() && it.uniques.contains("Hidden when religion is disabled")) + && !(!viewingCiv.gameInfo.hasReligionEnabled() && it.uniques.contains("Hidden when religion is disabled")) } if (regularBuildings.isNotEmpty()) { lineList += "{Buildings enabled}: " @@ -92,7 +92,7 @@ class Technology { if (!civInfo.gameInfo.gameParameters.nuclearWeaponsEnabled) enabledBuildings = enabledBuildings.filterNot { it.name == "Manhattan Project" } - if (!civInfo.gameInfo.hasRelgionEnabled()) + if (!civInfo.gameInfo.hasReligionEnabled()) enabledBuildings = enabledBuildings.filterNot { it.uniques.contains("Hidden when religion is disabled") } return enabledBuildings diff --git a/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt b/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt index 9f24f22b7e..67291e01e3 100644 --- a/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt @@ -31,7 +31,7 @@ class CityStatsTable(val cityScreen: CityScreen): Table() { val ministatsTable = Table() for ((stat, amount) in cityInfo.cityStats.currentCityStats.toHashMap()) { - if (stat == Stat.Faith && !cityInfo.civInfo.gameInfo.hasRelgionEnabled()) continue + if (stat == Stat.Faith && !cityInfo.civInfo.gameInfo.hasReligionEnabled()) continue ministatsTable.add(ImageGetter.getStatIcon(stat.name)).size(20f).padRight(5f) val valueToDisplay = if (stat == Stat.Happiness) cityInfo.cityStats.happinessList.values.sum() else amount ministatsTable.add(round(valueToDisplay).toInt().toString().toLabel()).padRight(10f) diff --git a/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt b/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt index 3784e88808..d42e5d51ba 100644 --- a/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/GameOptionsTable.kt @@ -50,7 +50,7 @@ class GameOptionsTable(val previousScreen: IPreviousScreen, val updatePlayerPick checkboxTable.addOneCityChallengeCheckbox() checkboxTable.addNuclearWeaponsCheckbox() checkboxTable.addIsOnlineMultiplayerCheckbox() - if (UncivGame.Current.settings.showExperimentalRelgion) + if (UncivGame.Current.settings.showExperimentalReligion) checkboxTable.addReligionCheckbox() checkboxTable.addModCheckboxes() add(checkboxTable).colspan(2).row() diff --git a/core/src/com/unciv/ui/overviewscreen/CityOverviewTable.kt b/core/src/com/unciv/ui/overviewscreen/CityOverviewTable.kt index 0919bd710f..2784a57740 100644 --- a/core/src/com/unciv/ui/overviewscreen/CityOverviewTable.kt +++ b/core/src/com/unciv/ui/overviewscreen/CityOverviewTable.kt @@ -24,7 +24,7 @@ class CityOverviewTable(private val viewingPlayer: CivilizationInfo, private val } private val columnsNames = arrayListOf("Population", "Food", "Gold", "Science", "Production", "Culture", "Happiness") - .apply { if (viewingPlayer.gameInfo.hasRelgionEnabled()) add("Faith") } + .apply { if (viewingPlayer.gameInfo.hasReligionEnabled()) add("Faith") } init { val numHeaderCells = columnsNames.size + 2 // +1 City +1 Filler diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt index e66430bc53..91867b6b2f 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt @@ -124,7 +124,7 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() { cultureLabel.onClick(invokePoliciesPage) cultureImage.onClick(invokePoliciesPage) - if(worldScreen.gameInfo.hasRelgionEnabled()) { + if(worldScreen.gameInfo.hasReligionEnabled()) { statsTable.add(faithLabel).padLeft(20f) statsTable.add(ImageGetter.getStatIcon("Faith")).padBottom(6f).size(20f) } diff --git a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt index be4465df11..edd9e02856 100644 --- a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt +++ b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt @@ -140,8 +140,8 @@ class OptionsPopup(val previousScreen:CameraStageBaseScreen) : Popup(previousScr settings.showExperimentalWorldWrap = it } addYesNoRow("{Enable experimental religion in start games}\n{HIHGLY EXPERIMENTAL - UPDATES WILL BREAK SAVES!}".tr(), - settings.showExperimentalRelgion) { - settings.showExperimentalRelgion = it + settings.showExperimentalReligion) { + settings.showExperimentalReligion = it }