Poodletooth-iLand/toontown/chat/TTSCWhiteListTerminal.py
Master Jumblespeed d882959bfa switch to remote
2015-05-18 22:11:33 -04:00

23 lines
847 B
Python
Executable file

from otp.speedchat.SCTerminal import SCTerminal
from otp.otpbase.OTPLocalizer import SpeedChatStaticText
SCStaticTextMsgEvent = 'SCStaticTextMsg'
def decodeSCStaticTextMsg(textId):
return SpeedChatStaticText.get(textId, None)
class TTSCWhiteListTerminal(SCTerminal):
def __init__(self, textId, parentMenu = None):
SCTerminal.__init__(self)
self.parentClass = parentMenu
self.textId = textId
self.text = SpeedChatStaticText[self.textId]
print 'SpeedText %s %s' % (self.textId, self.text)
def handleSelect(self):
SCTerminal.handleSelect(self)
if not self.parentClass.whisperAvatarId:
base.localAvatar.chatMgr.fsm.request('whiteListOpenChat')
else:
base.localAvatar.chatMgr.fsm.request('whiteListAvatarChat', [self.parentClass.whisperAvatarId])