def _TTSCCarolMenu__carolMessagesChanged(self):
        self.clearMenu()

        try:
            lt = base.localAvatar
        except:
            return None

        for section in CarolMenu:
            if section[0] == -1:
                for phrase in section[1].keys():
                    blatherTxt = section[1][phrase]
                    if blatherTxt not in OTPLocalizer.SpeedChatStaticText:
                        print 'warning: tried to link Carol phrase %s which does not seem to exist' % blatherTxt
                        break

                    self.append(
                        TTSCIndexedTerminal(
                            SpeedChatStaticText.get(phrase, None), blatherTxt))

            menu = SCMenu()
            for phrase in section[1]:
                if phrase not in OTPLocalizer.SpeedChatStaticText:
                    print 'warning: tried to link Carol phrase %s which does not seem to exist' % phrase
                    break

                menu.append(SCStaticTextTerminal(phrase))

            menuName = str(section[0])
            self.append(SCMenuHolder(menuName, menu))
Ejemplo n.º 2
0
    def __carolMessagesChanged(self):
        # clear out everything from our menu
        self.clearMenu()

        # if local toon has not been created, don't panic
        try:
            lt = base.localAvatar
        except:
            return 
        for section in CarolMenu:
            if section[0] == -1:
                #This is not a submenu but a terminal!
                for phrase in list(section[1].keys()):
                    blatherTxt = section[1][phrase]
                    if blatherTxt not in OTPLocalizer.SpeedChatStaticText:
                        print(('warning: tried to link Carol phrase %s which does not seem to exist' % blatherTxt))
                        break
                    self.append(TTSCIndexedTerminal(SpeedChatStaticText.get(phrase, None), blatherTxt))
            else: 
            #this should be a submenu
                menu = SCMenu()
                for phrase in section[1]:
                    if phrase not in OTPLocalizer.SpeedChatStaticText:
                        print(('warning: tried to link Carol phrase %s which does not seem to exist' % phrase))                                
                        break
                    menu.append(SCStaticTextTerminal(phrase))                    
                                        
                menuName = str(section[0])
                self.append( SCMenuHolder(menuName, menu) )
Ejemplo n.º 3
0
def decodeSCStaticTextMsg(textId):
    return SpeedChatStaticText.get(textId, None)
def decodeSCStaticTextMsg(textId):
    return SpeedChatStaticText.get(textId, None)
Ejemplo n.º 5
0
def decodeTTSCIndexedMsg(msgIndex):
    return SpeedChatStaticText.get(msgIndex, None)
Ejemplo n.º 6
0
from otp.otpbase.OTPLocalizer import SpeedChatStaticText, SpeedChatStaticTextToontown, SpeedChatStaticTextPirates, CustomSCStrings

# this script prints all static speedchat strings

msgs = set()

msgs.update(list(SpeedChatStaticText.values()))
msgs.update(list(SpeedChatStaticTextToontown.values()))
msgs.update(list(SpeedChatStaticTextPirates.values()))
msgs.update(list(CustomSCStrings.values()))

print('=== START SC STRINGS ===')

for msg in msgs:
    if len(msg):
        print(msg)
    
def decodeSCStaticTextMsg(textId):
    if 30200 <= textId <= 30205:
        textId += 20

    return SpeedChatStaticText.get(textId, None)
def decodeSCStaticTextMsg(textId):
    if 30200 <= textId <= 30205:
        textId += 20

    return SpeedChatStaticText.get(textId, None)