npcs: Spawn NPCs via SZHoodAI for playgrounds, and via fishing ponds for streets.
This commit is contained in:
parent
4ff33df4ae
commit
86c4d2c83e
2 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,7 @@ from toontown.dna.DNASpawnerAI import *
|
|||
from toontown.dna.DNAProp import DNAProp
|
||||
from toontown.dna.DNAGroup import DNAGroup
|
||||
from toontown.hood import ZoneUtil
|
||||
from toontown.toon import NPCToons
|
||||
|
||||
class DistributedFishingPondAI(DistributedObjectAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedFishingPondAI")
|
||||
|
@ -48,6 +49,9 @@ class DistributedFishingPondAI(DistributedObjectAI):
|
|||
|
||||
@dnaSpawn(DNAGroup, 'fishing_pond')
|
||||
def spawn(air, zone, element, match):
|
||||
if zone % 1000 != 0:
|
||||
# This should hopefully create the Fishermen NPCs on streets.
|
||||
NPCToons.createNpcsInZone(air, zone)
|
||||
pond = DistributedFishingPondAI(air)
|
||||
area = ZoneUtil.getBranchZone(zone)
|
||||
pond.setArea(area)
|
||||
|
|
|
@ -7,6 +7,7 @@ from toontown.building.DistributedHQInteriorAI import DistributedHQInteriorAI
|
|||
from toontown.safezone import TreasureGlobals
|
||||
from toontown.town.StreetAI import StreetAI
|
||||
from toontown.safezone.SZTreasurePlannerAI import SZTreasurePlannerAI
|
||||
from toontown.toon import NPCToons
|
||||
|
||||
class SZHoodAI(HoodAI):
|
||||
"""
|
||||
|
@ -36,6 +37,7 @@ class SZHoodAI(HoodAI):
|
|||
self.createTrolley()
|
||||
self.createTreasurePlanner()
|
||||
self.buildingMgr = DistributedBuildingMgrAI(self.air, self.HOOD, self.air.dnaStoreMap[self.HOOD], self.air.trophyMgr)
|
||||
NPCToons.createNpcsInZone(self.air, self.HOOD)
|
||||
|
||||
def createStreets(self):
|
||||
branchIds = ToontownGlobals.HoodHierarchy.get(self.HOOD, [])
|
||||
|
|
Loading…
Reference in a new issue