mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-26 21:22:27 -06:00
46 lines
1.6 KiB
Python
46 lines
1.6 KiB
Python
|
from direct.showbase import PythonUtil
|
||
|
from otp.speedchat.SCMenu import SCMenu
|
||
|
from otp.speedchat.SCMenuHolder import SCMenuHolder
|
||
|
from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal
|
||
|
from toontown.speedchat.TTSCIndexedTerminal import TTSCIndexedTerminal
|
||
|
from otp.otpbase import OTPLocalizer
|
||
|
SellbotInvasionMenu = [(OTPLocalizer.SellbotInvasionMenuSections[0], range(30400, 30404))]
|
||
|
|
||
|
class TTSCSellbotInvasionMenu(SCMenu):
|
||
|
|
||
|
def __init__(self):
|
||
|
SCMenu.__init__(self)
|
||
|
self.__messagesChanged()
|
||
|
|
||
|
def destroy(self):
|
||
|
SCMenu.destroy(self)
|
||
|
|
||
|
def clearMenu(self):
|
||
|
SCMenu.clearMenu(self)
|
||
|
|
||
|
def __messagesChanged(self):
|
||
|
self.clearMenu()
|
||
|
try:
|
||
|
lt = base.localAvatar
|
||
|
except:
|
||
|
return
|
||
|
|
||
|
for section in SellbotInvasionMenu:
|
||
|
if section[0] == -1:
|
||
|
for phrase in section[1]:
|
||
|
if phrase not in OTPLocalizer.SpeedChatStaticText:
|
||
|
print 'warning: tried to link Winter phrase %s which does not seem to exist' % phrase
|
||
|
break
|
||
|
self.append(SCStaticTextTerminal(phrase))
|
||
|
|
||
|
else:
|
||
|
menu = SCMenu()
|
||
|
for phrase in section[1]:
|
||
|
if phrase not in OTPLocalizer.SpeedChatStaticText:
|
||
|
print 'warning: tried to link Halloween phrase %s which does not seem to exist' % phrase
|
||
|
break
|
||
|
menu.append(SCStaticTextTerminal(phrase))
|
||
|
|
||
|
menuName = str(section[0])
|
||
|
self.append(SCMenuHolder(menuName, menu))
|