Singing removed

This commit is contained in:
DenialMC 2015-04-24 16:36:03 +03:00
parent dca35c221b
commit ac224306b2
10 changed files with 1 additions and 134 deletions

View file

@ -199,7 +199,6 @@ SCMenuBattleStrategy = 'STRATEGY'
SCMenuBoardingGroup = 'BOARDING'
SCMenuParties = 'PARTIES'
SCMenuAprilToons = "APRIL TOONS'"
SCMenuSingingGroup = 'SINGING'
SCMenuCarol = 'CAROLING'
SCMenuSillyHoliday = 'SILLY METER'
SCMenuVictoryParties = 'VICTORY PARTIES'
@ -2391,7 +2390,6 @@ SellbotNerfMenuSections = [-1, 'GROUPING', 'SELLBOT TOWERS/VP']
JellybeanJamMenuSections = ['GET JELLYBEANS', 'SPEND JELLYBEANS']
WinterMenuSections = ['CAROLING', -1]
HalloweenMenuSections = [-1]
SingingMenuSections = [-1]
WhiteListMenu = [-1, 'WHITELIST']
SellbotInvasionMenuSections = [-1]
SellbotFieldOfficeMenuSections = [-1, 'STRATEGY']

View file

@ -41,8 +41,6 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
canonicalZoneId = ZoneUtil.getCanonicalZoneId(self.zoneId)
self.notify.debug('canonicalZoneId = %s' % canonicalZoneId)
localAvatar.chatMgr.chatInputSpeedChat.addBoardingGroupMenu(canonicalZoneId)
if base.config.GetBool('want-singing', 0):
localAvatar.chatMgr.chatInputSpeedChat.addSingingGroupMenu()
def delete(self):
DistributedObject.DistributedObject.delete(self)

View file

@ -5,7 +5,6 @@ from toontown.speedchat.TTSpeedChatTypes import *
from otp.speedchat.SpeedChat import SpeedChat
from otp.speedchat import SpeedChatGlobals
from toontown.speedchat import TTSpeedChatGlobals
from toontown.speedchat import TTSCSingingTerminal
from toontown.speedchat import TTSCIndexedTerminal
from direct.showbase import DirectObject
from direct.fsm import ClassicFSM, State
@ -356,7 +355,6 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
self.ceoMenu = None
self.golfMenu = None
self.boardingGroupMenu = None
self.singingGroupMenu = None
self.aprilToonsMenu = None
self.victoryPartiesMenu = None
self.sillyPhaseOneMenu = None
@ -383,7 +381,6 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
listenForSCEvent(SpeedChatGlobals.SCEmoteNoAccessEvent, self.handleEmoteNoAccess)
listenForSCEvent(TTSpeedChatGlobals.TTSCToontaskMsgEvent, self.handleToontaskMsg)
listenForSCEvent(TTSpeedChatGlobals.TTSCResistanceMsgEvent, self.handleResistanceMsg)
listenForSCEvent(TTSCSingingTerminal.TTSCSingingMsgEvent, self.handleSingingMsg)
listenForSCEvent('SpeedChatStyleChange', self.handleSpeedChatStyleChange)
listenForSCEvent(TTSCIndexedTerminal.TTSCIndexedMsgEvent, self.handleStaticTextMsg)
self.fsm = ClassicFSM.ClassicFSM('SpeedChat', [State.State('off', self.enterOff, self.exitOff, ['active']), State.State('active', self.enterActive, self.exitActive, ['off'])], 'off', 'off')
@ -469,12 +466,6 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
else:
self.chatMgr.sendSCWhisperMessage(textId, self.whisperAvatarId)
def handleSingingMsg(self, textId):
if self.whisperAvatarId is None:
self.chatMgr.sendSCSingingChatMessage(textId)
else:
self.chatMgr.sendSCSingingWhisperMessage(textId)
def handleCustomMsg(self, textId):
if self.whisperAvatarId is None:
self.chatMgr.sendSCCustomChatMessage(textId)
@ -709,21 +700,6 @@ class TTChatInputSpeedChat(DirectObject.DirectObject):
self.boardingGroupMenu = None
return
def addSingingGroupMenu(self):
if self.singingGroupMenu == None:
menu = TTSCSingingMenu()
self.singingGroupMenu = SCMenuHolder(OTPLocalizer.SCMenuSingingGroup, menu=menu)
self.speedChat[2:2] = [self.singingGroupMenu]
return
def removeSingingMenu(self):
if self.singingGroupMenu:
i = self.speedChat.index(self.singingGroupMenu)
del self.speedChat[i]
self.singingGroupMenu.destroy()
self.singingGroupMenu = None
return
def addAprilToonsMenu(self):
if self.aprilToonsMenu == None:
menu = TTSCAprilToonsMenu()

View file

@ -70,13 +70,6 @@ class ToontownChatManager(ChatManager.ChatManager):
messenger.send('chatUpdateSCResistance', [textId])
self.announceSCChat()
def sendSCSingingChatMessage(self, textId):
messenger.send('chatUpdateSCSinging', [textId])
self.announceSCChat()
def sendSCSingingWhisperMessage(self, textId):
pass
def sendSCToontaskChatMessage(self, taskId, toNpcId, toonProgress, msgIndex):
messenger.send('chatUpdateSCToontask', [taskId,
toNpcId,

View file

@ -1,52 +0,0 @@
from direct.showbase import PythonUtil
from otp.speedchat.SCMenu import SCMenu
from otp.speedchat.SCMenuHolder import SCMenuHolder
from TTSCSingingTerminal import TTSCSingingTerminal
from otp.otpbase import OTPLocalizer
SingingMenuGuide = [(OTPLocalizer.SingingMenuSections[0], [{9000: 25},
{9001: 26},
{9002: 27},
{9003: 28},
{9004: 29},
{9005: 30},
{9006: 31},
{9007: 32},
{9008: 33}])]
class TTSCSingingMenu(SCMenu):
def __init__(self):
SCMenu.__init__(self)
self.__singingMessagesChanged()
def destroy(self):
SCMenu.destroy(self)
def clearMenu(self):
SCMenu.clearMenu(self)
def __singingMessagesChanged(self):
self.clearMenu()
try:
lt = base.localAvatar
except:
return
for count in xrange(len(SingingMenuGuide)):
section = SingingMenuGuide[count]
if section[0] == -1:
for phrase in section[1]:
emote = None
if type(phrase) == type({}):
item = phrase.keys()[0]
emote = phrase[item]
phrase = item
if phrase not in OTPLocalizer.SpeedChatStaticText:
print 'warning: tried to link a singing phrase %s which does not seem to exist' % phrase
break
terminal = TTSCSingingTerminal(phrase)
if emote is not None:
terminal.setLinkedEmote(emote)
self.append(terminal)
return

View file

@ -1,24 +0,0 @@
from otp.speedchat.SCTerminal import SCTerminal
from otp.otpbase.OTPLocalizer import SpeedChatStaticText
TTSCSingingMsgEvent = 'SCSingingMsg'
def decodeSCStaticTextMsg(textId):
return SpeedChatStaticText.get(textId, None)
class TTSCSingingTerminal(SCTerminal):
def __init__(self, textId):
SCTerminal.__init__(self)
self.textId = textId
self.text = SpeedChatStaticText[self.textId]
def handleSelect(self):
SCTerminal.handleSelect(self)
messenger.send(self.getEventName(TTSCSingingMsgEvent), [self.textId])
def finalize(self):
args = {'rolloverSound': None,
'clickSound': None}
SCTerminal.finalize(self, args)
return

View file

@ -10,7 +10,6 @@ from TTSCResistanceTerminal import TTSCResistanceTerminal
from TTSCKartRacingMenu import TTSCKartRacingMenu
from TTSCGolfMenu import TTSCGolfMenu
from TTSCBoardingMenu import TTSCBoardingMenu
from TTSCSingingMenu import TTSCSingingMenu
from TTSCAprilToonsMenu import TTSCAprilToonsMenu
from TTSCSillyPhaseOneMenu import TTSCSillyPhaseOneMenu
from TTSCSillyPhaseTwoMenu import TTSCSillyPhaseTwoMenu

View file

@ -346,21 +346,9 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
if chatString:
self.setChatAbsolute(chatString, CFSpeech | CFQuicktalker | CFTimeout)
def b_setSCSinging(self, msgIndex):
self.setSCSinging(msgIndex)
self.d_setSCSinging(msgIndex)
return None
def d_setSCSinging(self, msgIndex):
messenger.send('wakeup')
self.sendUpdate('setSCSinging', [msgIndex])
def sendLogSuspiciousEvent(self, msg):
localAvatar.sendUpdate('logSuspiciousEvent', ['%s for %s' % (msg, self.doId)])
def setSCSinging(self, msgIndex):
self.sendUpdate('logSuspiciousEvent', ['invalid msgIndex in setSCSinging: %s from %s' % (msgIndex, self.doId)])
def d_reqSCResistance(self, msgIndex):
messenger.send('wakeup')
nearbyPlayers = self.getNearbyPlayers(ResistanceChat.EFFECT_RADIUS)

View file

@ -3640,13 +3640,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
if strSearch.search(eventName, 0, 100):
self.air.district.recordSuspiciousEventData(len(eventStr))
self.air.writeServerEvent('suspicious', self.doId, eventStr)
if simbase.config.GetBool('want-ban-setSCSinging', True):
if 'invalid msgIndex in setSCSinging:' in eventName:
if senderId == self.doId:
commentStr = 'Toon %s trying to call setSCSinging' % self.doId
simbase.air.banManager.ban(self.doId, self.DISLid, commentStr)
else:
self.notify.warning('logSuspiciousEvent event=%s senderId=%s != self.doId=%s' % (eventName, senderId, self.doId))
if simbase.config.GetBool('want-ban-setAnimState', True):
if eventName.startswith('setAnimState: '):
if senderId == self.doId:

View file

@ -483,7 +483,6 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
LocalAvatar.LocalAvatar.startChat(self)
self.accept('chatUpdateSCToontask', self.b_setSCToontask)
self.accept('chatUpdateSCResistance', self.d_reqSCResistance)
self.accept('chatUpdateSCSinging', self.b_setSCSinging)
self.accept('whisperUpdateSCToontask', self.whisperSCToontaskTo)
else:
self.notify.info('NOT calling LocalAvatar.startchat, in tutorial')
@ -492,7 +491,6 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
LocalAvatar.LocalAvatar.stopChat(self)
self.ignore('chatUpdateSCToontask')
self.ignore('chatUpdateSCResistance')
self.ignore('chatUpdateSCSinging')
self.ignore('whisperUpdateSCToontask')
def tunnelIn(self, tunnelOrigin):