Ahwaric
Shrubbery-hugger
I am currently working on the modmod for Fall from Heaven that adds some tactical changes and new guilds (corporations).
If you want you can check it here: Orbi
For one of the corporations I need it to spawn a building when civ spreads to a city, as I need some extra effects for it.
I tried the code below in the CvEventManager.py :
Unfortunatelly it does not work. Any advice what I am doing wrong?
I need also to prevent the spawning in the cities that already have BUILDING_BAZAAR. How should I do that?
Anything that helps is appreciated
If you want you can check it here: Orbi
For one of the corporations I need it to spawn a building when civ spreads to a city, as I need some extra effects for it.
I tried the code below in the CvEventManager.py :
Code:
def onCorporationSpread(self, argsList):
'Corporation Has Spread to a City'
iCorporation, iOwner, pSpreadCity = argsList
player = PyPlayer(iOwner)
iSteward = gc.getInfoTypeForString('CORPORATION_STEWARDS_OF_INEQUITY')
pPlayer = gc.getPlayer(iOwner)
if iCorporation == iSteward:
city.setNumRealBuilding(gc.getInfoTypeForString('BUILDING_STEWARDS'), 1)
if (not self.__LOG_RELIGIONSPREAD):
return
CvUtil.pyPrint('%s has spread to Player %d Civilization %s city of %s'
%(gc.getCorporationInfo(iCorporation).getDescription(), iOwner, player.getCivilizationName(), pSpreadCity.getName()))
Unfortunatelly it does not work. Any advice what I am doing wrong?
I need also to prevent the spawning in the cities that already have BUILDING_BAZAAR. How should I do that?
Anything that helps is appreciated