Relgion -> Religion (#4321)

This commit is contained in:
SomeTroglodyte 2021-07-01 08:02:41 +02:00 committed by GitHub
parent 74fd80416c
commit ae84d3f5c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -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())

View File

@ -41,7 +41,7 @@ class GameSettings {
var visualMods = HashSet<String>()
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"

View File

@ -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"

View File

@ -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

View File

@ -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)

View File

@ -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()

View File

@ -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

View File

@ -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)
}

View File

@ -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
}