mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-19 16:57:38 +07:00
Resolved #9340 - fixed 'enhance religion' crash
This commit is contained in:
parent
ade3af7729
commit
ea64f941a6
@ -6,6 +6,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.Constants
|
||||
import com.unciv.logic.civilization.Civilization
|
||||
import com.unciv.logic.civilization.managers.ReligionState
|
||||
import com.unciv.models.Counter
|
||||
import com.unciv.models.Religion
|
||||
import com.unciv.models.ruleset.Belief
|
||||
@ -75,7 +76,8 @@ class ReligiousBeliefsPickerScreen (
|
||||
if (pickIconAndName) "Choose a Religion"
|
||||
else "Enhance [${currentReligion.getReligionDisplayName()}]"
|
||||
) {
|
||||
civInfo.religionManager.foundReligion(displayName!!, religionName!!)
|
||||
if (civInfo.religionManager.religionState == ReligionState.FoundingReligion)
|
||||
civInfo.religionManager.foundReligion(displayName!!, religionName!!)
|
||||
chooseBeliefs(beliefsToChoose.map { it.belief!! }, usingFreeBeliefs())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user