Cybah
Emperor
- Joined
- Jun 22, 2007
- Messages
- 1,481
Hi there! After upgrading BUG Mod from 3.6 to 4.0 (newest SVN) for my own mod, it seems that CvGameUtils.py is not loading anymore or there are problems with it.
Also, I dunno if I need to modify CvEventManager.py now with all of my custom additions?
As you can see on the screenshot, you can build all of the 4 processes. Normally you should only be able to build the 125% one after you have built a special wonder.
GameUtils Code:
This worked under 3.6.
Any ideas/advices?
Also, I dunno if I need to modify CvEventManager.py now with all of my custom additions?
As you can see on the screenshot, you can build all of the 4 processes. Normally you should only be able to build the 125% one after you have built a special wonder.
GameUtils Code:
Code:
def canMaintain(self,argsList):
pCity = argsList[0]
eProcess = argsList[1]
bContinue = argsList[2]
## Troyes Start ##
pPlayer = gc.getPlayer(pCity.getOwner())
b_Troyes = gc.getInfoTypeForString("BUILDING_TROYES")
obsoleteTech = gc.getBuildingInfo(b_Troyes).getObsoleteTech()
if ( eProcess == gc.getInfoTypeForString("PROCESS_WEALTH2") ) or ( eProcess == gc.getInfoTypeForString("PROCESS_CULTURE2") ):
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
for iCity in range(pPlayer.getNumCities()):
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_Troyes) == true:
return True
b_Copernicus = gc.getInfoTypeForString("BUILDING_COPERNICUS")
obsoleteTechC = gc.getBuildingInfo(b_Copernicus).getObsoleteTech()
if eProcess == gc.getInfoTypeForString("PROCESS_RESEARCH2"):
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTechC) == false or obsoleteTechC == -1 ):
for iCity in range(pPlayer.getNumCities()):
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_Copernicus) == true:
return True
## Troyes End ##
return False
def cannotMaintain(self,argsList):
pCity = argsList[0]
eProcess = argsList[1]
bContinue = argsList[2]
pPlayer = gc.getPlayer(pCity.getOwner())
iTechCurrency = CvUtil.findInfoTypeNum(gc.getTechInfo,gc.getNumTechInfos(),'TECH_CURRENCY')
if gc.getTeam(pPlayer.getTeam()).isHasTech(iTechCurrency):
if eProcess == gc.getInfoTypeForString("PROCESS_WEALTH0"):
return True
if eProcess == gc.getInfoTypeForString("PROCESS_WEALTH0"):
if gc.getTeam(pPlayer.getTeam()).isHasTech(iTechCurrency):
return True
## Troyes Start ##
pPlayer = gc.getPlayer(pCity.getOwner())
b_Troyes = gc.getInfoTypeForString("BUILDING_TROYES")
obsoleteTech = gc.getBuildingInfo(b_Troyes).getObsoleteTech()
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
for iCity in range(pPlayer.getNumCities()):
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_Troyes) == true:
if ( eProcess == gc.getInfoTypeForString("PROCESS_WEALTH") ) or ( eProcess == gc.getInfoTypeForString("PROCESS_CULTURE") ):
return True
if ( eProcess == gc.getInfoTypeForString("PROCESS_WEALTH2") ) or ( eProcess == gc.getInfoTypeForString("PROCESS_CULTURE2") ):
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
for iCity in range(pPlayer.getNumCities()):
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_Troyes) == false:
return true
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == true or obsoleteTech == 1 ):
return True
b_Copernicus = gc.getInfoTypeForString("BUILDING_COPERNICUS")
obsoleteTechC = gc.getBuildingInfo(b_Copernicus).getObsoleteTech()
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTechC) == false or obsoleteTechC == -1 ):
for iCity in range(pPlayer.getNumCities()):
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_Copernicus) == true:
if eProcess == gc.getInfoTypeForString("PROCESS_RESEARCH"):
return True
if eProcess == gc.getInfoTypeForString("PROCESS_RESEARCH2"):
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTechC) == false or obsoleteTechC == -1 ):
for iCity in range(pPlayer.getNumCities()):
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_Copernicus) == false:
return true
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTechC) == true or obsoleteTechC == 1 ):
return True
## Troyes End ##
return False
This worked under 3.6.
Any ideas/advices?