mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
31 lines
1.3 KiB
Python
31 lines
1.3 KiB
Python
|
from direct.directnotify import DirectNotifyGlobal
|
||
|
from direct.distributed import DistributedObject
|
||
|
from toontown.ai import DistributedPhaseEventMgr
|
||
|
|
||
|
class DistributedHydrantZeroMgr(DistributedPhaseEventMgr.DistributedPhaseEventMgr):
|
||
|
neverDisable = 1
|
||
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedHydrantZeroMgr')
|
||
|
|
||
|
def __init__(self, cr):
|
||
|
DistributedPhaseEventMgr.DistributedPhaseEventMgr.__init__(self, cr)
|
||
|
cr.hydrantZeroMgr = self
|
||
|
|
||
|
def announceGenerate(self):
|
||
|
DistributedPhaseEventMgr.DistributedPhaseEventMgr.announceGenerate(self)
|
||
|
messenger.send('hydrantZeroIsRunning', [self.isRunning])
|
||
|
|
||
|
def delete(self):
|
||
|
self.notify.debug('deleting hydrantzeromgr')
|
||
|
messenger.send('hydrantZeroIsRunning', [False])
|
||
|
DistributedPhaseEventMgr.DistributedPhaseEventMgr.delete(self)
|
||
|
if hasattr(self.cr, 'hydrantZeroMgr'):
|
||
|
del self.cr.hydrantZeroMgr
|
||
|
|
||
|
def setCurPhase(self, newPhase):
|
||
|
DistributedPhaseEventMgr.DistributedPhaseEventMgr.setCurPhase(self, newPhase)
|
||
|
messenger.send('hydrantZeroPhase', [newPhase])
|
||
|
|
||
|
def setIsRunning(self, isRunning):
|
||
|
DistributedPhaseEventMgr.DistributedPhaseEventMgr.setIsRunning(self, isRunning)
|
||
|
messenger.send('hydrantZeroIsRunning', [isRunning])
|