2015-03-03 22:10:12 +00:00
|
|
|
from toontown.hood import HoodAI
|
|
|
|
from toontown.safezone import ButterflyGlobals
|
|
|
|
from toontown.safezone import DistributedButterflyAI
|
|
|
|
from toontown.safezone import DistributedDGFlowerAI
|
|
|
|
from toontown.safezone import DistributedTrolleyAI
|
|
|
|
from toontown.toonbase import ToontownGlobals
|
2015-06-23 20:20:41 +00:00
|
|
|
from toontown.ai import DistributedEffectMgrAI
|
2015-03-03 22:10:12 +00:00
|
|
|
|
|
|
|
class DGHoodAI(HoodAI.HoodAI):
|
2015-06-23 12:27:14 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def __init__(self, air):
|
|
|
|
HoodAI.HoodAI.__init__(self, air,
|
|
|
|
ToontownGlobals.DaisyGardens,
|
|
|
|
ToontownGlobals.DaisyGardens)
|
|
|
|
|
|
|
|
self.trolley = None
|
|
|
|
self.flower = None
|
|
|
|
|
|
|
|
self.startup()
|
|
|
|
|
|
|
|
def startup(self):
|
|
|
|
HoodAI.HoodAI.startup(self)
|
|
|
|
|
|
|
|
if simbase.config.GetBool('want-minigames', True):
|
|
|
|
self.createTrolley()
|
|
|
|
self.createFlower()
|
|
|
|
if simbase.config.GetBool('want-butterflies', True):
|
|
|
|
self.createButterflies()
|
2015-06-11 02:20:40 +00:00
|
|
|
|
2015-06-23 12:27:14 +00:00
|
|
|
self.greenToonMgr = DistributedEffectMgrAI.DistributedEffectMgrAI(self.air, ToontownGlobals.IDES_OF_MARCH, 15)
|
|
|
|
self.greenToonMgr.generateWithRequired(5819)
|
2015-06-11 02:20:40 +00:00
|
|
|
|
2015-06-24 13:49:20 +00:00
|
|
|
self.trickOrTreatMgr = DistributedEffectMgrAI.DistributedEffectMgrAI(self.air, ToontownGlobals.HALLOWEEN, 12)
|
2015-06-23 20:20:41 +00:00
|
|
|
self.trickOrTreatMgr.generateWithRequired(5620) # Rake It Inn, Elm Street
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-06-24 13:49:20 +00:00
|
|
|
self.winterCarolingMgr = DistributedEffectMgrAI.DistributedEffectMgrAI(self.air, ToontownGlobals.CHRISTMAS, 14)
|
2015-06-23 20:20:41 +00:00
|
|
|
self.winterCarolingMgr.generateWithRequired(5626) # Pine Needle Crafts, Elm Street
|
2015-03-03 22:10:12 +00:00
|
|
|
|
|
|
|
def shutdown(self):
|
|
|
|
HoodAI.HoodAI.shutdown(self)
|
|
|
|
|
|
|
|
ButterflyGlobals.clearIndexes(self.zoneId)
|
|
|
|
|
|
|
|
def createTrolley(self):
|
|
|
|
self.trolley = DistributedTrolleyAI.DistributedTrolleyAI(self.air)
|
|
|
|
self.trolley.generateWithRequired(self.zoneId)
|
|
|
|
self.trolley.start()
|
|
|
|
|
|
|
|
def createFlower(self):
|
|
|
|
self.flower = DistributedDGFlowerAI.DistributedDGFlowerAI(self.air)
|
|
|
|
self.flower.generateWithRequired(self.zoneId)
|
|
|
|
self.flower.start()
|
|
|
|
|
2015-06-11 02:20:40 +00:00
|
|
|
def createButterflies(self):
|
|
|
|
playground = ButterflyGlobals.DG
|
2015-03-03 22:10:12 +00:00
|
|
|
ButterflyGlobals.generateIndexes(self.zoneId, ButterflyGlobals.DG)
|
2015-06-23 20:20:41 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
for i in xrange(0, ButterflyGlobals.NUM_BUTTERFLY_AREAS[ButterflyGlobals.DG]):
|
|
|
|
for _ in xrange(0, ButterflyGlobals.NUM_BUTTERFLIES[ButterflyGlobals.DG]):
|
2015-06-11 02:20:40 +00:00
|
|
|
butterfly = DistributedButterflyAI.DistributedButterflyAI(self.air, playground, i, self.zoneId)
|
2015-03-03 22:10:12 +00:00
|
|
|
butterfly.generateWithRequired(self.zoneId)
|
2015-07-05 23:59:25 +00:00
|
|
|
butterfly.start()
|