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
|
|
|
|
|
|
|
|
class DistributedBlackCatMgr(DistributedObject):
|
2015-04-07 09:55:39 -05:00
|
|
|
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)
|
2015-04-07 09:55:39 -05:00
|
|
|
base.cr.blackCatMgr = self
|
2015-03-03 16:10:12 -06:00
|
|
|
|
|
|
|
def delete(self):
|
2015-04-07 09:55:39 -05:00
|
|
|
base.cr.blackCatMgr = None
|
2015-06-21 03:29:47 -05:00
|
|
|
DistributedObject.delete(self)
|
2015-03-03 16:10:12 -06:00
|
|
|
|
2015-04-07 09:55:39 -05:00
|
|
|
def requestBlackCatTransformation(self):
|
2015-06-21 03:29:47 -05:00
|
|
|
if not base.cr.newsManager.isHolidayRunning(ToontownGlobals.BLACK_CAT_DAY):
|
|
|
|
return
|
|
|
|
|
2015-04-07 09:55:39 -05:00
|
|
|
self.sendUpdate('requestBlackCatTransformation')
|
2015-03-03 16:10:12 -06:00
|
|
|
|
2015-04-07 09:55:39 -05:00
|
|
|
def doBlackCatTransformation(self):
|
2015-06-21 03:29:47 -05:00
|
|
|
base.localAvatar.getDustCloud(0.0, color=base.localAvatar.style.getBlackColor()).start()
|