Hey, I'm trying to get a building unable to be constructed if a certain game option is turned on. I know it's in CvGameUtils and I've done similar coding for preventing a building if another building was present or if the city isn't in range of a certain terrain feature, but I can't seem to get it to work with a game option.
in def cannotConstruct(self,argsList):
doesn't work, neither does:
Am i just making a really obvious mistake I'm not noticing? Is it possible to tie this to a game option or if there's another way to do this (i.e. if Choose Religions is turned on you can't construct Building A)?
in def cannotConstruct(self,argsList):
Code:
if ( eBuilding == gc.getInfoTypeForString("BUILDING_A ") ):
if ( CyGame().isOption(gc.getInfoTypeForString("GAMEOPTION_PICK_RELIGION"))==false ):
return False
return True
doesn't work, neither does:
Code:
if ( eBuilding == gc.getInfoTypeForString("BUILDING_A ") ):
if ( CyGame().isOption(gc.getInfoTypeForString("GAMEOPTION_PICK_RELIGION"))==true ):
return True
Am i just making a really obvious mistake I'm not noticing? Is it possible to tie this to a game option or if there's another way to do this (i.e. if Choose Religions is turned on you can't construct Building A)?