StreetAI: spawn buildingmgr and suitplanner in correct places

This commit is contained in:
Maverick Mosher 2014-04-19 17:43:40 -07:00
parent 8ec767b66b
commit f2a88e2e8a

View file

@ -15,15 +15,13 @@ class StreetAI:
self.zoneId = zoneId
self.air.dnaStoreMap[self.zoneId] = self.air.loadDNA(self.air.genDNAFileName(self.zoneId)).generateData()
self.sp = DistributedSuitPlannerAI(self.air, self.zoneId)
self.sp.generateWithRequired(self.zoneId)
self.sp.d_setZoneId(self.zoneId)
self.sp.initTasks()
self.spawnObjects()
def spawnObjects(self):
filename = self.air.genDNAFileName(self.zoneId)
self.buildingMgr = DistributedBuildingMgrAI(self.air, self.zoneId, self.air.dnaStoreMap[self.zoneId], self.air.trophyMgr)
self.air.dnaSpawner.spawnObjects(filename, self.zoneId)
self.buildingMgr = DistributedBuildingMgrAI(self.air, self.zoneId, self.air.dnaStoreMap[self.zoneId], self.air.trophyMgr)
self.sp = DistributedSuitPlannerAI(self.air, self.zoneId)
self.sp.generateWithRequired(self.zoneId)
self.sp.d_setZoneId(self.zoneId)
self.sp.initTasks()