Poodletooth-iLand/toontown/ai/DistributedPolarPlaceEffectMgrAI.py

27 lines
837 B
Python
Raw Normal View History

2015-03-03 22:10:12 +00:00
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from direct.distributed.ClockDelta import *
from direct.fsm.FSM import FSM
import time
class DistributedPolarPlaceEffectMgrAI(DistributedObjectAI, FSM):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedPolarPlaceEffectMgrAI")
2015-04-29 04:01:52 +00:00
2015-03-03 22:10:12 +00:00
def __init__(self, air):
DistributedObjectAI.__init__(self, air)
FSM.__init__(self, 'ResistanceFSM')
self.air = air
2015-04-29 04:01:52 +00:00
2015-03-03 22:10:12 +00:00
def enterOff(self):
self.requestDelete()
def addPolarPlaceEffect(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av:
return
2015-03-03 22:10:12 +00:00
expireTime = int((time.time()/60) + 0.5) + 60
2015-07-05 23:59:25 +00:00
av.b_setCheesyEffect(13, 3000, expireTime)