Poodletooth-iLand/toontown/ai/DistributedBlackCatMgr.py

25 lines
877 B
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from direct.directnotify import DirectNotifyGlobal
2015-06-21 03:29:47 -05:00
from direct.distributed.DistributedObject import DistributedObject
from toontown.toonbase import ToontownGlobals
2015-07-05 18:59:25 -05:00
2015-06-21 03:29:47 -05:00
class DistributedBlackCatMgr(DistributedObject):
neverDisable = 1
2015-03-03 16:10:12 -06:00
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBlackCatMgr')
def announceGenerate(self):
2015-06-21 03:29:47 -05:00
DistributedObject.announceGenerate(self)
base.cr.blackCatMgr = self
2015-03-03 16:10:12 -06:00
def delete(self):
base.cr.blackCatMgr = None
2015-06-21 03:29:47 -05:00
DistributedObject.delete(self)
2015-03-03 16:10:12 -06:00
def requestBlackCatTransformation(self):
2015-06-21 03:29:47 -05:00
if not base.cr.newsManager.isHolidayRunning(ToontownGlobals.BLACK_CAT_DAY):
return
self.sendUpdate('requestBlackCatTransformation')
2015-03-03 16:10:12 -06:00
def doBlackCatTransformation(self):
2015-07-05 18:59:25 -05:00
base.localAvatar.getDustCloud(0.0, color=base.localAvatar.style.getBlackColor()).start()