xaster
Warlord
- Joined
- Oct 5, 2003
- Messages
- 128
Hi All,
i hope somebody can help me. I try to adjust the code function from CvGameUtils.py a little bit.
I have two national wonders. But I plan to allow only one of this wonders at a time.
Player must decide which one is preferred. For example:
If BUILDING_XXX is build you cannot get BUILDING_ZZZ and reverse....
I know this function from Next War Mod and it is working in a single city. Can I use it for a team or player ???
Cheers
Xas
i hope somebody can help me. I try to adjust the code function from CvGameUtils.py a little bit.
I have two national wonders. But I plan to allow only one of this wonders at a time.
Player must decide which one is preferred. For example:
If BUILDING_XXX is build you cannot get BUILDING_ZZZ and reverse....
I know this function from Next War Mod and it is working in a single city. Can I use it for a team or player ???
Code:
def cannotConstruct(self,argsList):
pCity = argsList[0]
eBuilding = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
bIgnoreCost = argsList[4]
#TEST
if eBuilding == gc.getInfoTypeForString("BUILDING_XXX"):
if pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_ZZZ")):
return True
#TEST
if eBuilding == gc.getInfoTypeForString("BUILDING_ZZZ"):
if pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_XXX")):
return True
return False
Cheers
Xas