Fixed a few spots using the name of a religion instead of its displayName (#5216)

This commit is contained in:
Xander Lenstra
2021-09-14 16:33:06 +02:00
committed by GitHub
parent f9e0c39021
commit fe3220299c
2 changed files with 6 additions and 4 deletions

View File

@ -112,11 +112,13 @@ class CityInfoReligionManager {
}
private fun triggerReligionAdoption(newMajorityReligion: String) {
cityInfo.civInfo.addNotification("Your city [${cityInfo.name}] was converted to [$newMajorityReligion]!", cityInfo.location, NotificationIcon.Faith)
val newMajorityReligionObject = cityInfo.civInfo.gameInfo.religions[newMajorityReligion]!!
cityInfo.civInfo.addNotification("Your city [${cityInfo.name}] was converted to [${newMajorityReligionObject.getReligionDisplayName()}]!", cityInfo.location, NotificationIcon.Faith)
if (newMajorityReligion in religionsAtSomePointAdopted) return
val religionOwningCiv = cityInfo.civInfo.gameInfo.getCivilization(cityInfo.civInfo.gameInfo.religions[newMajorityReligion]!!.foundingCivName)
for (unique in cityInfo.civInfo.gameInfo.religions[newMajorityReligion]!!.getFounderUniques()) {
val religionOwningCiv = cityInfo.civInfo.gameInfo.getCivilization(newMajorityReligionObject.foundingCivName)
for (unique in newMajorityReligionObject.getFounderUniques()) {
val statsGranted = when (unique.placeholderText) {
"[] when a city adopts this religion for the first time (modified by game speed)" ->
unique.stats.times(cityInfo.civInfo.gameInfo.gameParameters.gameSpeed.modifier)

View File

@ -131,7 +131,7 @@ class ReligiousBeliefsPickerScreen (
private fun setupVisibleReligionIcons() {
topReligionIcons.clear()
val descriptionLabel = choosingCiv.religionManager.religion!!.name.toLabel()
val descriptionLabel = choosingCiv.religionManager.religion!!.getReligionDisplayName().toLabel()
val iconsTable = Table()