Python question for BTS

eukaliptus

Chieftain
Joined
Oct 13, 2007
Messages
22
I wanted to create a food caravan, like before (make some unit that would build "BUILDING_UNLOAD_FOOD" and when it does city gets +50 food for example).. this script used to work:

# globals
gc = CyGlobalContext()

class Caravan:
def onBuildingBuilt(self, argsList):
'Building Completed'
pCity, iBuildingType = argsList
if (gc.getBuildingInfo(iBuildingType).getType() == "BUILDING_UNLOAD_FOOD"):
pCity.setHasRealBuilding(gc.getInfoTypeForString('BUILDING_UNLOAD_FOOD'),0)
pCity.changeFood(50)

I just tried it ijn BTS 3.13 and doesnt works anymore it seems :(
any idea why? do I need to change something?
 
ok i found a solution ..

in BTS "setHasRealBuilding" is replaced with "setNumRealBuilding"

why do they change that stuff anyway...
 
Top Bottom