mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 12:12:36 -06:00
21 lines
668 B
Python
21 lines
668 B
Python
|
from direct.directnotify.DirectNotifyGlobal import *
|
||
|
from direct.distributed import DistributedObjectAI
|
||
|
from toontown.toonbase import ToontownGlobals
|
||
|
|
||
|
class SafeZoneManagerAI(DistributedObjectAI.DistributedObjectAI):
|
||
|
notify = directNotify.newCategory('SafeZoneManagerAI')
|
||
|
|
||
|
def enterSafeZone(self):
|
||
|
avId = self.air.getAvatarIdFromSender()
|
||
|
av = self.air.doId2do.get(avId)
|
||
|
if not av:
|
||
|
return
|
||
|
av.startToonUp(ToontownGlobals.TOONUP_FREQUENCY)
|
||
|
|
||
|
def exitSafeZone(self):
|
||
|
avId = self.air.getAvatarIdFromSender()
|
||
|
av = self.air.doId2do.get(avId)
|
||
|
if not av:
|
||
|
return
|
||
|
av.stopToonUp()
|