historical/toontown-classic.git/toontown/ai/DistributedResistanceEmoteMgrAI.py
2024-01-16 11:20:27 -06:00

18 lines
672 B
Python

from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from otp.otpbase.OTPLocalizer import EmoteFuncDict
class DistributedResistanceEmoteMgrAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedResistanceEmoteMgrAI')
def addResistanceEmote(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av:
return
if not av.emoteAccess[EmoteFuncDict['Resistance Salute']]:
av.emoteAccess[EmoteFuncDict['Resistance Salute']] = 1
av.b_setEmoteAccess(av.emoteAccess)