oldschool-toontown/toontown/minigame/TrolleyHolidayMgrAI.py

22 lines
841 B
Python
Raw Normal View History

2019-11-02 17:27:54 -05:00
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals, TTLocalizer
from toontown.ai import HolidayBaseAI
class TrolleyHolidayMgrAI(HolidayBaseAI.HolidayBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory('TrolleyHolidayMgrAI')
PostName = 'TrolleyHoliday'
StartStopMsg = 'TrolleyHolidayStartStop'
def __init__(self, air, holidayId):
HolidayBaseAI.HolidayBaseAI.__init__(self, air, holidayId)
def start(self):
bboard.post(TrolleyHolidayMgrAI.PostName, True)
simbase.air.newsManager.trolleyHolidayStart()
messenger.send(TrolleyHolidayMgrAI.StartStopMsg)
def stop(self):
bboard.remove(TrolleyHolidayMgrAI.PostName)
simbase.air.newsManager.trolleyHolidayEnd()
messenger.send(TrolleyHolidayMgrAI.StartStopMsg)