def _TTSCWinterMenu__messagesChanged(self, carol): self.clearMenu() try: lt = base.localAvatar except: return None winterMenu = [] if carol: winterMenu.append(WinterMenu[0]) winterMenu.append(WinterMenu[1]) for section in winterMenu: 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)) menu = SCMenu() for phrase in section[1].keys(): blatherTxt = section[1][phrase] if blatherTxt not in OTPLocalizer.SpeedChatStaticText: print 'warning: tried to link Winter phrase %s which does not seem to exist' % phrase break menu.append(TTSCIndexedTerminal(OTPLocalizer.SpeedChatStaticText.get(phrase, None), blatherTxt)) menuName = str(section[0]) self.append(SCMenuHolder(menuName, menu))
def _TTSCSillyPhaseFourMenu__SillyPhaseFourMessagesChanged(self): self.clearMenu() try: lt = base.localAvatar except: return None for section in SillyPhaseFourMenu: if section[0] == -1: for phrase in section[1]: if phrase not in OTPLocalizer.SpeedChatStaticText: print 'warning: tried to link Silly PhaseFour phrase %s which does not seem to exist' % phrase break self.append(SCStaticTextTerminal(phrase)) menu = SCMenu() for phrase in section[1]: if phrase not in OTPLocalizer.SpeedChatStaticText: print 'warning: tried to link Silly PhaseFour phrase %s which does not seem to exist' % phrase break menu.append(SCStaticTextTerminal(phrase)) menuName = str(section[0]) self.append(SCMenuHolder(menuName, menu))
def _TTSCSellbotFieldOfficeMenu__messagesChanged(self, inSellbotFieldOffice): self.clearMenu() try: lt = base.localAvatar except: return None for section in SellbotFieldOfficeMenu: 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)) if inSellbotFieldOffice: 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)) continue
def __init__(self): SCMenu.__init__(self) self.accept('localAvatarQuestAdded', self._PSpeedChatQuestMenu__questMenuRefresh) self.accept('localAvatarQuestUpdate', self._PSpeedChatQuestMenu__questMenuRefresh) self.accept('localAvatarQuestItemUpdate', self._PSpeedChatQuestMenu__questMenuRefresh) self.accept('localAvatarQuestComplete', self._PSpeedChatQuestMenu__questMenuRefresh) self.accept('localAvatarQuestDeleted', self._PSpeedChatQuestMenu__questMenuRefresh)
def __boardingMessagesChanged(self, zoneId): self.clearMenu() try: lt = base.localAvatar except: return for count in xrange(len(BoardingMenuGuide)): section = BoardingMenuGuide[count] if section[0] == -1: for phrase in section[1]: if phrase not in OTPLocalizer.SpeedChatStaticText: print 'warning: tried to link boarding phrase %s which does not seem to exist' % phrase break self.append(SCStaticTextTerminal(phrase)) else: menu = SCMenu() phrases = ZoneIdsToMsgs[zoneId][count] for phrase in phrases: if phrase not in OTPLocalizer.SpeedChatStaticText: print 'warning: tried to link boarding phrase %s which does not seem to exist' % phrase break menu.append(SCStaticTextTerminal(phrase)) menuName = str(section[0]) self.append(SCMenuHolder(menuName, menu))
def __messagesChanged(self, phase): self.clearMenu() try: lt = base.localAvatar except: return for section in JellybeanJamMenu: if section[0] == -1: for phrase in section[1]: if phrase not in OTPLocalizer.SpeedChatStaticText: print 'warning: tried to link Jellybean Jam 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 Jellybean Jam phrase %s which does not seem to exist' % phrase break menu.append(SCStaticTextTerminal(phrase)) menuName = str(section[0]) self.append(SCMenuHolder(menuName, menu))
def __init__(self): SCMenu.__init__(self) self.meetMenuHolder = None zoneId = base.cr.playGame.getPlaceId() if zoneId and zoneId == 11000: meetMenu = SCMenu() for msgIndex in OTPLocalizer.SCFactoryMeetMenuIndexes: term = SCStaticTextTerminal(msgIndex) meetMenu.append(term) self.meetMenuHolder = SCMenuHolder.SCMenuHolder(OTPLocalizer.SCMenuFactoryMeet, meetMenu) self[0:0] = [self.meetMenuHolder] self.accept('factoryZoneChanged', self.__zoneChanged) self.__zoneChanged() return
def __resistanceMessagesChanged(self): self.clearMenu() try: lt = base.localAvatar except: return phrases = lt.resistanceMessages for menuIndex in ResistanceChat.resistanceMenu: menu = SCMenu() for itemIndex in ResistanceChat.getItems(menuIndex): textId = ResistanceChat.encodeId(menuIndex, itemIndex) charges = lt.getResistanceMessageCharges(textId) if charges > 0: menu.append(TTSCResistanceTerminal(textId, charges)) textId = ResistanceChat.encodeId(menuIndex, 0) menuName = ResistanceChat.getMenuName(textId) self.append(SCMenuHolder(menuName, menu))
def __init__(self): SCMenu.__init__(self) self.accept("questsChanged", self.__tasksChanged) self.__tasksChanged()
def __init__(self, zoneId): SCMenu.__init__(self) self.__boardingMessagesChanged(zoneId)
def __init__(self): SCMenu.__init__(self) self.accept('kartRacingMessagesChanged', self.__kartRacingMessagesChanged) self.__kartRacingMessagesChanged() submenus = []
def __init__(self): SCMenu.__init__(self) self.__aprilToonsMessagesChanged() submenus = []
def __init__(self): SCMenu.__init__(self) self._TTSCSillyPhaseFourMenu__SillyPhaseFourMessagesChanged() submenus = []
def __init__(self): SCMenu.__init__(self) self.accept('petTrickPhrasesChanged', self.__phrasesChanged) self.__phrasesChanged()
def __init__(self, phase): SCMenu.__init__(self) if phase in JellybeanJamPhases: self.__messagesChanged(phase) else: print 'warning: tried to add Jellybean Jam phase %s which does not seem to exist' % phase
def __init__(self): SCMenu.__init__(self) self.accept('questsChanged', self.__tasksChanged) self.__tasksChanged()
def __init__(self): SCMenu.__init__(self) self.accept('resistanceMessagesChanged', self.__resistanceMessagesChanged) self.__resistanceMessagesChanged() submenus = []
def __init__(self): SCMenu.__init__(self) self.accept('golfMessagesChanged', self.__golfMessagesChanged) self.__golfMessagesChanged() submenus = []
def __init__(self, carol): SCMenu.__init__(self) self._TTSCWinterMenu__messagesChanged(carol)
def __init__(self, sections): SCMenu.__init__(self) self.sections = sections self.__messagesChanged()
def __messagesChanged(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 VictoryPartiesMenu: if section[0] == -1: #This is not a submenu but a terminal! for phrase in section[1].keys(): blatherTxt = section[1][phrase] if blatherTxt not in OTPLocalizer.SpeedChatStaticText: self.notify.warning("tried to link Victory Parties 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: self.notify.warning("tried to link Victory Parties phrase %s which does not seem to exist" % phrase) break menu.append(SCStaticTextTerminal(phrase)) menuName = str(section[0]) self.append( SCMenuHolder(menuName, menu) ) """ # 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 VictoryPartiesMenu: if section[0] == -1: #This is not a submenu but a terminal! for phrase in section[1]: if phrase not in OTPLocalizer.SpeedChatStaticText: print( 'warning: tried to link Victory Parties phrase %s which does not seem to exist' % phrase) break self.append(SCStaticTextTerminal(phrase)) else: #this should be a submenu menu = SCMenu() for phrase in section[1]: if phrase not in OTPLocalizer.SpeedChatStaticText: print( 'warning: tried to link Victory Parties phrase %s which does not seem to exist' % phrase) break menu.append(SCStaticTextTerminal(phrase)) menuName = str(section[0]) self.append(SCMenuHolder(menuName, menu))
def __init__(self): SCMenu.__init__(self) self.accept('sellbotFieldOfficeChanged', self.__messagesChanged) self.__messagesChanged(False)
def __init__(self): SCMenu.__init__(self) base.TTSCPromotionalMenu = self self.curHolidayId = None self.clearMenu() return
def __init__(self, indices): SCMenu.__init__(self) for index in indices: term = SCStaticTextTerminal(index) self.append(term)
def __init__(self): SCMenu.__init__(self) self.__singingMessagesChanged()
def destroy(self): del base.TTSCPromotionalMenu SCMenu.destroy(self)
def __init__(self): SCMenu.__init__(self) self.accept('sellbotFieldOfficeChanged', self._TTSCSellbotFieldOfficeMenu__messagesChanged) self._TTSCSellbotFieldOfficeMenu__messagesChanged(False)
def __init__(self): SCMenu.__init__(self) self.__messagesChanged()
def __init__(self): SCMenu.__init__(self) self.accept('customMessagesChanged', self.__customMessagesChanged) self.__customMessagesChanged()
def destroy(self): self.ignore('factoryZoneChanged') SCMenu.destroy(self)
def __init__(self): SCMenu.__init__(self) self._TTSCIdesOfMarchMenu__messagesChanged()
def __init__(self): SCMenu.__init__(self) self._TTSCSellbotNerfMenu__messagesChanged()
def __init__(self, carol): SCMenu.__init__(self) self.__messagesChanged(carol)
def __init__(self): SCMenu.__init__(self) self._TTSCSellbotInvasionMenu__messagesChanged()
def __init__(self): SCMenu.__init__(self) self.__SillyPhaseThreeMessagesChanged() submenus = []
def __init__(self): SCMenu.__init__(self) self._TTSCSingingMenu__singingMessagesChanged()
def destroy(self): self.ignore('petTrickPhrasesChanged') SCMenu.destroy(self)
def __init__(self): SCMenu.__init__(self) self.__SillyPhaseTwoMessagesChanged() submenus = []
def destroy(self): SCMenu.destroy(self)
def clearMenu(self): SCMenu.clearMenu(self)
def __init__(self): SCMenu.__init__(self) self.__messagesChanged() submenus = []
def __init__(self): SCMenu.__init__(self) self.accept('emotesChanged', self.__emoteAccessChanged) self.__emoteAccessChanged()
def __init__(self, zoneId): SCMenu.__init__(self) # listen for changes to localtoon's boarding speedchat messages self.__boardingMessagesChanged(zoneId)