OrionVeteran
Deity
I have a python function that is producing double religious foundings and I am not sure why. One religion is founded like choose religions is false (It's not). The other religion is founded correctly with the popup. I want to eliminate the automatic founding of a religion that is without the popup. Here is the last part of the code:
My question is: How can I limit the religious founding to that which the individual picks with the popup?
Orion Veteran
Code:
if xChooseReligion:
if CvPlayer.isHuman():
# Create Religion Selection Popup
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON)
popupInfo.setData1(iPlayer)
popupInfo.setText(CyTranslator().getText(("TXT_KEY_FOUNDED_RELIGION"),()))
# Find all unfounded religions
for iNewReligion in range(gc.getNumReligionInfos()):
if not gc.getGame().isReligionFounded(iNewReligion):
popupInfo.addPythonButton(gc.getReligionInfo(iNewReligion).getDescription(), gc.getReligionInfo(iNewReligion).getButton())
popupInfo.addPopup(1)
# Found Selected Religion
gc.getPlayer(iPlayer).foundReligion(iNewReligion, iNewReligion, True)
My question is: How can I limit the religious founding to that which the individual picks with the popup?
Orion Veteran