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