OrionVeteran
Deity
I ran into a problem with the "onTechAcquired" function. I had previously believed that this function would detect each and every tech discovery or acquisition. This turned out to be false, as I ran into a scenario where a religious tech was founded, but the onTechAcquired function failed to detect it. This discovery makes the onTechAcquired function a bad choice for triggering other functions that depend on tech discovery. I badly need a function that will detect the discovery or acquisition of any and all techs a player gets, without exception. Is there a function that can be used instead of the onTechAcquired function? I can build a function to perform a tech check, but I have no function to supply the discovered tech.
There are other ways to get a religious tech type, but again, I do not have a reliable source to compare it to (notice bold line). Any ideas would be greatly appreciated, as I have been struggling with this for a long time.
Respectfully,
Orion Veteran
Spoiler :
Code:
def ReligiousTechCheck(iPlayer, iTechType):
# Limited Religions
pPlayer = gc.getPlayer(iPlayer)
TechCheck = False
for iTech in range(gc.getNumTechInfos()):
# Is this a religious Tech?
if isReligiousTech(iTech):
# Does the player have this tech?
if gc.getTeam(pPlayer.getTeam()).isHasTech(iTech):
[COLOR="Red"][B]if iTech == iTechType:[/B][/COLOR]
TechCheck = True
break
return TechCheck
There are other ways to get a religious tech type, but again, I do not have a reliable source to compare it to (notice bold line). Any ideas would be greatly appreciated, as I have been struggling with this for a long time.
Respectfully,
Orion Veteran