From c3ac8aff07716541a2c810a57f4f23d621e262c2 Mon Sep 17 00:00:00 2001 From: DenialMC Date: Thu, 23 Apr 2015 01:17:51 +0300 Subject: [PATCH] More holocaust --- astron/dclass/united.dc | 8 +-- otp/ai/AIInterestHandles.py | 7 --- otp/chat/ChatGlobals.py | 9 +--- otp/chat/ChatInputWhiteListFrame.py | 13 ----- otp/chat/TalkAssistant.py | 70 --------------------------- otp/chat/TalkGlobals.py | 7 +-- otp/distributed/DCClassImports.py | 4 +- otp/distributed/OtpDoGlobals.py | 18 ------- otp/friends/PlayerFriendsManager.py | 11 ----- otp/otpbase/OTPLocalizerEnglish.py | 3 -- otp/speedchat/SCGMTextTerminal.py | 15 ------ otp/speedchat/SCMenu.py | 5 +- otp/speedchat/SpeedChatGMHandler.py | 47 ------------------ otp/speedchat/SpeedChatGlobals.py | 1 - otp/speedchat/SpeedChatTypes.py | 1 - otp/uberdog/RejectCode.py | 3 -- otp/uberdog/__init__.py | 0 toontown/chat/TTChatInputWhiteList.py | 2 - toontown/friends/FriendInviter.py | 10 +--- toontown/toon/LocalToon.py | 23 --------- 20 files changed, 8 insertions(+), 249 deletions(-) delete mode 100644 otp/ai/AIInterestHandles.py delete mode 100644 otp/speedchat/SCGMTextTerminal.py delete mode 100644 otp/speedchat/SpeedChatGMHandler.py delete mode 100644 otp/uberdog/RejectCode.py delete mode 100644 otp/uberdog/__init__.py diff --git a/astron/dclass/united.dc b/astron/dclass/united.dc index d07c4169..02171907 100644 --- a/astron/dclass/united.dc +++ b/astron/dclass/united.dc @@ -178,11 +178,6 @@ dclass TalkPath_group { string(0-400) chat, TalkModification [], uint8 flags) clsend airecv; }; -dclass TalkPath_account { - setTalkAccount(DoId toAcc, DoId fromAcc, string(0-256) avName, - string(0-400) msg, TalkModification [], uint8 flags) airecv clsend; -}; - dclass AvatarHandle : TalkPath_whisper { }; @@ -312,7 +307,7 @@ dclass LeaderBoard : LeaderBoardReceiver { getTopTenRespondTo(string, uint32); }; -dclass PlayerFriendsManager : DistributedObject, TalkPath_account { +dclass PlayerFriendsManager : DistributedObject { requestInvite(uint32, uint32, uint8) airecv clsend; invitationFrom(uint32, string); retractInvite(uint32); @@ -412,7 +407,6 @@ from toontown.coghq import DistributedSellbotHQDoor/AI from toontown.toon import DistributedNPCToonBase/AI from toontown.toon import DistributedNPCToon/AI from toontown.toon import DistributedSmartNPC/AI -from toontown.toon import DistributedSmartNPC/AI from toontown.toon import DistributedNPCSpecialQuestGiver/AI from toontown.toon import DistributedNPCFlippyInToonHall/AI from toontown.toon import DistributedNPCScientist/AI diff --git a/otp/ai/AIInterestHandles.py b/otp/ai/AIInterestHandles.py deleted file mode 100644 index eef85276..00000000 --- a/otp/ai/AIInterestHandles.py +++ /dev/null @@ -1,7 +0,0 @@ -PIRATES_CARDGAME = 1 -PIRATES_CREW = 2 -PIRATES_FRIENDS = 3 -PIRATES_BAND = 4 -PIRATES_PVP_RESPAWN = 5 -PIRATES_TREASUREMAP = 6 -PIRATES_SHIPPVP = 7 diff --git a/otp/chat/ChatGlobals.py b/otp/chat/ChatGlobals.py index d886cdc3..d2b3cc63 100644 --- a/otp/chat/ChatGlobals.py +++ b/otp/chat/ChatGlobals.py @@ -1,14 +1,10 @@ import string NORMAL_CHAT = 1 WHISPER_CHAT = 2 -CREW_CHAT = 3 -SHIPPVP_CHAT = 4 ERROR_NONE = None ERROR_NO_OPEN_CHAT = 1 ERROR_NOT_FRIENDS = 2 ERROR_NO_RECEIVER = 3 -ERROR_NO_CREW_CHAT = 4 -ERROR_NO_SHIPPVP_CHAT = 5 TYPEDCHAT = 0 SPEEDCHAT_NORMAL = 1 SPEEDCHAT_EMOTE = 2 @@ -18,10 +14,7 @@ GAMECHAT = 5 PARTYCHAT = 6 SPEEDCHAT_QUEST = 7 FRIEND_UPDATE = 8 -CREW_UPDATE = 9 -AVATAR_UNAVAILABLE = 10 -SHIPPVPCHAT = 11 -GMCHAT = 12 +AVATAR_UNAVAILABLE = 9 ChatEvent = 'ChatEvent' NormalChatEvent = 'NormalChatEvent' SCChatEvent = 'SCChatEvent' diff --git a/otp/chat/ChatInputWhiteListFrame.py b/otp/chat/ChatInputWhiteListFrame.py index 1ec006be..16b15d41 100644 --- a/otp/chat/ChatInputWhiteListFrame.py +++ b/otp/chat/ChatInputWhiteListFrame.py @@ -117,13 +117,6 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame): def exitAllChat(self): pass - def enterCrewChat(self): - self['focus'] = 1 - self.show() - - def exitCrewChat(self): - pass - def enterPlayerWhisper(self): self.tempText = self.chatEntry.get() self.activate() @@ -214,8 +207,6 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame): base.talkAssistant.sendOpenTalk(text) elif self.receiverId and not self.toPlayer: base.talkAssistant.sendWhisperTalk(text, self.receiverId) - elif self.receiverId and self.toPlayer: - base.talkAssistant.sendAccountTalk(text, self.receiverId) def sendChatByMode(self, text): state = self.getCurrentOrNextState() @@ -224,10 +215,6 @@ class ChatInputWhiteListFrame(FSM.FSM, DirectFrame): base.talkAssistant.sendPlayerWhisperWLChat(text, self.whisperId) elif state == 'AvatarWhisper': base.talkAssistant.sendAvatarWhisperWLChat(text, self.whisperId) - elif state == 'CrewChat': - base.talkAssistant.sendAvatarCrewWLChat(text) - elif len(text) > 0 and text[0] == '~': - base.talkAssistant.sendOpenTalk(text) else: base.talkAssistant.sendOpenTalk(text) diff --git a/otp/chat/TalkAssistant.py b/otp/chat/TalkAssistant.py index a56d03e7..9ccb269c 100644 --- a/otp/chat/TalkAssistant.py +++ b/otp/chat/TalkAssistant.py @@ -129,9 +129,6 @@ class TalkAssistant(DirectObject.DirectObject): return 0 def addToHistoryDISLId(self, message, dISLId, scrubbed = 0): - if message.getTalkType() == TALK_ACCOUNT: - self.lastWhisperPlayerId = dISLId - self.lastWhisper = self.lastWhisperPlayerId if dISLId not in self.historyByDISLId: self.historyByDISLId[dISLId] = [] self.historyByDISLId[dISLId].append(message) @@ -215,21 +212,6 @@ class TalkAssistant(DirectObject.DirectObject): else: return message - def fillWithTestText(self): - hold = self.floodThreshold - self.floodThreshold = 1000.0 - self.receiveOpenTalk(1001, 'Bob the Ghost', None, None, 'Hello from the machine') - self.receiveOpenTalk(1001, 'Bob the Ghost', None, None, 'More text for ya!') - self.receiveOpenTalk(1001, 'Bob the Ghost', None, None, 'Hope this makes life easier') - self.receiveOpenTalk(1002, 'Doug the Spirit', None, None, 'Now we need some longer text that will spill over onto two lines') - self.receiveOpenTalk(1002, 'Doug the Spirit', None, None, 'Maybe I will tell you') - self.receiveOpenTalk(1001, 'Bob the Ghost', None, None, 'If you are seeing this text it is because you are cool') - self.receiveOpenTalk(1002, 'Doug the Spirit', None, None, "That's right, there is no need to call tech support") - self.receiveOpenTalk(localAvatar.doId, localAvatar.getName, None, None, "Okay I won't call tech support, because I am cool") - self.receiveGMTalk(1003, 'God of Text', None, None, 'Good because I have seen it already') - self.floodThreshold = hold - return - def printHistoryComplete(self): print 'HISTORY COMPLETE' for message in self.historyComplete: @@ -346,39 +328,6 @@ class TalkAssistant(DirectObject.DirectObject): messenger.send('NewOpenMessage', [newMessage]) return error - def receiveAccountTalk(self, avatarId, avatarName, accountId, accountName, toId, toName, message, scrubbed = 0): - if not accountName and base.cr.playerFriendsManager.playerId2Info.get(accountId): - accountName = base.cr.playerFriendsManager.playerId2Info.get(accountId).playerName - error = None - if not avatarName and avatarId: - avatarName = self.findAvatarName(avatarId) - if not accountName and accountId: - accountName = self.findPlayerName(accountId) - newMessage = TalkMessage(self.countMessage(), self.stampTime(), message, avatarId, avatarName, accountId, accountName, None, None, toId, toName, TALK_ACCOUNT, None) - self.historyComplete.append(newMessage) - if avatarId: - self.addToHistoryDoId(newMessage, avatarId, scrubbed) - if accountId: - self.addToHistoryDISLId(newMessage, accountId, scrubbed) - messenger.send('NewOpenMessage', [newMessage]) - return error - - def receiveGMTalk(self, avatarId, avatarName, accountId, accountName, message, scrubbed = 0): - error = None - if not avatarName and avatarId: - avatarName = self.findAvatarName(avatarId) - if not accountName and accountId: - accountName = self.findPlayerName(accountId) - newMessage = TalkMessage(self.countMessage(), self.stampTime(), message, avatarId, avatarName, accountId, accountName, None, None, None, None, TALK_GM, None) - self.historyComplete.append(newMessage) - self.historyOpen.append(newMessage) - if avatarId: - self.addToHistoryDoId(newMessage, avatarId) - if accountId: - self.addToHistoryDISLId(newMessage, accountId) - messenger.send('NewOpenMessage', [newMessage]) - return error - def receiveThought(self, avatarId, avatarName, accountId, accountName, message, scrubbed = 0): error = None if not avatarName and avatarId: @@ -419,14 +368,6 @@ class TalkAssistant(DirectObject.DirectObject): messenger.send('NewOpenMessage', [newMessage]) return error - def receiveDeveloperMessage(self, message): - error = None - newMessage = TalkMessage(self.countMessage(), self.stampTime(), message, None, None, None, None, localAvatar.doId, localAvatar.getName(), localAvatar.DISLid, localAvatar.DISLname, INFO_DEV, None) - self.historyComplete.append(newMessage) - self.historyUpdates.append(newMessage) - messenger.send('NewOpenMessage', [newMessage]) - return error - def receiveFriendUpdate(self, friendId, friendName, isOnline): if isOnline: onlineMessage = OTPLocalizer.FriendOnline @@ -513,7 +454,6 @@ class TalkAssistant(DirectObject.DirectObject): tyler.sendUpdate('talkMessage', [doId, message]) if base.cr.wantMagicWords and len(message) > 0 and message[0] == '~': messenger.send('magicWord', [message]) - self.receiveDeveloperMessage(message) else: chatFlags = CFSpeech | CFTimeout if self.isThought(message): @@ -540,16 +480,6 @@ class TalkAssistant(DirectObject.DirectObject): base.cr.ttuFriendsManager.sendUpdate('sendTalkWhisper', [receiverAvId, message]) - def sendAccountTalk(self, message, receiverAccount): - error = None - base.cr.playerFriendsManager.sendUpdate('setTalkAccount', [receiverAccount, - 0, - '', - message, - [], - 0]) - return error - def sendOpenSpeedChat(self, type, messageIndex): error = None if type == SPEEDCHAT_NORMAL: diff --git a/otp/chat/TalkGlobals.py b/otp/chat/TalkGlobals.py index 25321cd1..c77e912c 100644 --- a/otp/chat/TalkGlobals.py +++ b/otp/chat/TalkGlobals.py @@ -9,8 +9,5 @@ UPDATE_PVP = 7 INFO_SYSTEM = 8 INFO_GAME = 9 INFO_AVATAR_UNAVAILABLE = 10 -TALK_ACCOUNT = 11 -TALK_GM = 12 -INFO_OPEN = 13 -AVATAR_THOUGHT = 14 -INFO_DEV = 15 +INFO_OPEN = 11 +AVATAR_THOUGHT = 12 diff --git a/otp/distributed/DCClassImports.py b/otp/distributed/DCClassImports.py index ab0a9921..75f6780c 100644 --- a/otp/distributed/DCClassImports.py +++ b/otp/distributed/DCClassImports.py @@ -2,7 +2,7 @@ from pandac.PandaModules import * -hashVal = 1239960628 +hashVal = 3280849111L from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot @@ -35,7 +35,7 @@ from toontown.friends import TTPlayerFriendsManager, TTUFriendsManager from toontown.cogdominium import DistributedCogdoInterior, DistributedCogdoBattleBldg, DistributedCogdoElevatorExt, DistributedCogdoElevatorInt, DistributedCogdoBarrel, DistCogdoGame, DistCogdoLevelGame, DistCogdoBoardroomGame, DistCogdoCraneGame, DistCogdoMazeGame, DistCogdoFlyingGame, DistCogdoCrane, DistCogdoCraneMoneyBag, DistCogdoCraneCog from otp.distributed import Account, DistributedDistrict, DistributedDirectory from toontown.estate import DistributedCannon, DistributedTarget, EstateManager, DistributedEstate, DistributedHouse, DistributedHouseInterior, DistributedGarden, DistributedHouseDoor, DistributedMailbox, DistributedFurnitureManager, DistributedFurnitureItem, DistributedBank, DistributedCloset, DistributedTrunk, DistributedPhone, DistributedFireworksCannon, DistributedLawnDecor, DistributedGardenPlot, DistributedGardenBox, DistributedFlower, DistributedGagTree, DistributedStatuary, DistributedToonStatuary, DistributedChangingStatuary, DistributedAnimatedStatuary, DistributedPlantBase, DistributedLawnDecor -from toontown.toon import DistributedToon, DistributedNPCToonBase, DistributedNPCToon, DistributedSmartNPC, DistributedSmartNPC, DistributedNPCSpecialQuestGiver, DistributedNPCFlippyInToonHall, DistributedNPCScientist, DistributedNPCClerk, DistributedNPCTailor, DistributedNPCBlocker, DistributedNPCFisherman, DistributedNPCPartyPerson, DistributedNPCPetclerk, DistributedNPCKartClerk, DistributedNPCGlove +from toontown.toon import DistributedToon, DistributedNPCToonBase, DistributedNPCToon, DistributedSmartNPC, DistributedNPCSpecialQuestGiver, DistributedNPCFlippyInToonHall, DistributedNPCScientist, DistributedNPCClerk, DistributedNPCTailor, DistributedNPCBlocker, DistributedNPCFisherman, DistributedNPCPartyPerson, DistributedNPCPetclerk, DistributedNPCKartClerk, DistributedNPCGlove from toontown.tutorial import DistributedBattleTutorial, TutorialManager from toontown.pets import DistributedPetProxy from toontown.coderedemption.TTCodeRedemptionMgr import TTCodeRedemptionMgr diff --git a/otp/distributed/OtpDoGlobals.py b/otp/distributed/OtpDoGlobals.py index 16df897b..0cfcf1c2 100644 --- a/otp/distributed/OtpDoGlobals.py +++ b/otp/distributed/OtpDoGlobals.py @@ -12,10 +12,7 @@ OTP_NET_MSGR_CHANNEL_ID_UBER_DOG = 4606 OTP_NET_MSGR_CHANNEL_ID_AI_ONLY = 4607 OTP_DO_ID_COMMON = 4615 OTP_DO_ID_GATEWAY = 4616 -OTP_DO_ID_PIRATES = 4617 OTP_DO_ID_TOONTOWN = 4618 -OTP_DO_ID_FAIRIES = 4619 -OTP_DO_ID_CARS = 4620 OTP_DO_ID_AVATARS = 4630 OTP_DO_ID_FRIENDS = 4640 OTP_DO_ID_ESCROW = 4660 @@ -23,18 +20,11 @@ OTP_DO_ID_CLIENT_SERVICES_MANAGER = 4665 OTP_DO_ID_TTU_FRIENDS_MANAGER = 4666 OPT_DO_ID_GROUP_MANAGER = 4667 OTP_DO_ID_GLOBAL_PARTY_MANAGER = 4477 -OTP_DO_ID_PIRATES_AVATAR_MANAGER = 4674 -OTP_DO_ID_PIRATES_CREW_MANAGER = 4675 -OTP_DO_ID_PIRATES_INVENTORY_MANAGER = 4677 -OTP_DO_ID_PIRATES_SHIP_MANAGER = 4678 -OTP_DO_ID_PIRATES_TRAVEL_AGENT = 4679 -OTP_DO_ID_PIRATES_FRIENDS_MANAGER = 4680 OTP_DO_ID_CHAT_MANAGER = 4681 OTP_DO_ID_TOONTOWN_AVATAR_MANAGER = 4682 OTP_DO_ID_TOONTOWN_TEMP_STORE_MANAGER = 4684 OTP_DO_ID_SWITCHBOARD_MANAGER = 4685 OTP_DO_ID_PLAYER_FRIENDS_MANAGER = 4687 -OTP_DO_ID_CARS_AVATAR_MANAGER = 4689 OTP_DO_ID_TOONTOWN_MAIL_MANAGER = 4690 OTP_DO_ID_TOONTOWN_PARTY_MANAGER = 4691 OTP_DO_ID_TOONTOWN_RAT_MANAGER = 4692 @@ -44,13 +34,6 @@ OTP_DO_ID_TOONTOWN_CODE_REDEMPTION_MANAGER = 4695 OTP_DO_ID_TOONTOWN_NON_REPEATABLE_RANDOM_SOURCE = 4697 OTP_DO_ID_AI_TRADE_AVATAR = 4698 OTP_DO_ID_TOONTOWN_WHITELIST_MANAGER = 4699 -OTP_DO_ID_PIRATES_MATCH_MAKER = 4700 -OTP_DO_ID_PIRATES_AWARD_MAKER = 4702 -OTP_DO_ID_PIRATES_CODE_REDEMPTION = 4703 -OTP_DO_ID_PIRATES_SETTINGS_MANAGER = 4704 -OTP_DO_ID_PIRATES_HOLIDAY_MANAGER = 4705 -OTP_DO_ID_PIRATES_CREW_MATCH_MANAGER = 4706 -OTP_DO_ID_PIRATES_AVATAR_ACCESSORIES_MANAGER = 4710 OTP_DO_ID_TOONTOWN_CPU_INFO_MANAGER = 4713 OTP_DO_ID_TOONTOWN_SECURITY_MANAGER = 4714 OTP_DO_ID_SNAPSHOT_DISPATCHER = 4800 @@ -75,7 +58,6 @@ OTP_DO_ID_SNAPSHOT_RENDERER_17 = 4817 OTP_DO_ID_SNAPSHOT_RENDERER_18 = 4818 OTP_DO_ID_SNAPSHOT_RENDERER_19 = 4819 OTP_DO_ID_SNAPSHOT_RENDERER_20 = 4820 -OTP_DO_ID_PIRATES_INVENTORY_MANAGER_BASE = 5001 OTP_ZONE_ID_INVALID = 0 OTP_ZONE_ID_OLD_QUIET_ZONE = 1 OTP_ZONE_ID_MANAGEMENT = 2 diff --git a/otp/friends/PlayerFriendsManager.py b/otp/friends/PlayerFriendsManager.py index 861b3eb7..c0eb308b 100644 --- a/otp/friends/PlayerFriendsManager.py +++ b/otp/friends/PlayerFriendsManager.py @@ -42,17 +42,6 @@ class PlayerFriendsManager(DistributedObjectGlobal): def sendSCEmoteWhisper(self, recipientId, msgId): self.sendUpdate('whisperSCEmoteTo', [0, recipientId, msgId]) - def setTalkAccount(self, toAc, fromAc, fromName, message, mods, flags): - localAvatar.displayTalkAccount(fromAc, fromName, message, mods) - toName = None - friendInfo = self.getFriendInfo(toAc) - if friendInfo: - toName = friendInfo.playerName - elif toAc == localAvatar.DISLid: - toName = localAvatar.getName() - base.talkAssistant.receiveAccountTalk(None, None, fromAc, fromName, toAc, toName, message) - return - def invitationFrom(self, playerId, avatarName): messenger.send(OTPGlobals.PlayerFriendInvitationEvent, [playerId, avatarName]) diff --git a/otp/otpbase/OTPLocalizerEnglish.py b/otp/otpbase/OTPLocalizerEnglish.py index bf566bb8..b66d840c 100644 --- a/otp/otpbase/OTPLocalizerEnglish.py +++ b/otp/otpbase/OTPLocalizerEnglish.py @@ -256,8 +256,6 @@ FriendInviterFriendSaidNoNewFriends = "%s isn't looking for new friends right no FriendInviterOtherTooMany = '%s has too many friends already!' FriendInviterMaybe = '%s was unable to answer.' FriendInviterDown = 'Cannot make friends now.' -TalkParty = 'P' -TalkPVP = 'PVP' AntiSpamInChat = '***Spamming***' IgnoreConfirmOK = lOK IgnoreConfirmCancel = lCancel @@ -1770,7 +1768,6 @@ Emotes_Dances = 'Dances' Emotes_General = 'General' Emotes_Music = 'Music' Emotes_Expressions = 'Emotions' -Emote_ShipDenied = 'Cannot emote while sailing.' Emote_MoveDenied = 'Cannot emote while moving.' Emote_CombatDenied = 'Cannot emote while in combat.' Emote_CannonDenied = 'Cannot emote while using a cannon.' diff --git a/otp/speedchat/SCGMTextTerminal.py b/otp/speedchat/SCGMTextTerminal.py deleted file mode 100644 index 5063e3d5..00000000 --- a/otp/speedchat/SCGMTextTerminal.py +++ /dev/null @@ -1,15 +0,0 @@ -from SCTerminal import SCTerminal -from otp.speedchat import SpeedChatGMHandler -SCGMTextMsgEvent = 'SCGMTextMsg' - -class SCGMTextTerminal(SCTerminal): - - def __init__(self, textId): - SCTerminal.__init__(self) - gmHandler = SpeedChatGMHandler.SpeedChatGMHandler() - self.textId = textId - self.text = gmHandler.getPhrase(textId) - - def handleSelect(self): - SCTerminal.handleSelect(self) - messenger.send(self.getEventName(SCGMTextMsgEvent), [self.textId]) diff --git a/otp/speedchat/SCMenu.py b/otp/speedchat/SCMenu.py index 3b3b61c0..1394a591 100644 --- a/otp/speedchat/SCMenu.py +++ b/otp/speedchat/SCMenu.py @@ -94,7 +94,7 @@ class SCMenu(SCObject, NodePath): self.appendFromStructure(structure) def appendFromStructure(self, structure): - from SpeedChatTypes import SCMenuHolder, SCStaticTextTerminal, SCGMTextTerminal + from SpeedChatTypes import SCMenuHolder, SCStaticTextTerminal from otp.otpbase import OTPLocalizer def addChildren(menu, childList): @@ -123,9 +123,6 @@ class SCMenu(SCObject, NodePath): holder = SCMenuHolder(holderTitle, menu=subMenu) menu.append(holder) addChildren(subMenu, subMenuChildren) - elif type(child) == type('') and child[:2] == 'gm': - terminal = SCGMTextTerminal(child) - menu.append(terminal) else: raise 'error parsing speedchat structure. invalid child: %s' % child diff --git a/otp/speedchat/SpeedChatGMHandler.py b/otp/speedchat/SpeedChatGMHandler.py deleted file mode 100644 index 3d4995f4..00000000 --- a/otp/speedchat/SpeedChatGMHandler.py +++ /dev/null @@ -1,47 +0,0 @@ -from pandac.PandaModules import * -from direct.showbase import DirectObject -from otp.otpbase import OTPLocalizer - -class SpeedChatGMHandler(DirectObject.DirectObject): - scStructure = None - scList = {} - - def __init__(self): - if SpeedChatGMHandler.scStructure is None: - self.generateSCStructure() - return - - def generateSCStructure(self): - SpeedChatGMHandler.scStructure = [OTPLocalizer.PSCMenuGM] - phraseCount = 0 - numGMCategories = base.config.GetInt('num-gm-categories', 0) - for i in xrange(0, numGMCategories): - categoryName = base.config.GetString('gm-category-%d' % i, '') - if categoryName == '': - continue - categoryStructure = [categoryName] - numCategoryPhrases = base.config.GetInt('gm-category-%d-phrases' % i, 0) - for j in xrange(0, numCategoryPhrases): - phrase = base.config.GetString('gm-category-%d-phrase-%d' % (i, j), '') - if phrase != '': - idx = 'gm%d' % phraseCount - SpeedChatGMHandler.scList[idx] = phrase - categoryStructure.append(idx) - phraseCount += 1 - - SpeedChatGMHandler.scStructure.append(categoryStructure) - - numGMPhrases = base.config.GetInt('num-gm-phrases', 0) - for i in xrange(0, numGMPhrases): - phrase = base.config.GetString('gm-phrase-%d' % i, '') - if phrase != '': - idx = 'gm%d' % phraseCount - SpeedChatGMHandler.scList[idx] = phrase - SpeedChatGMHandler.scStructure.append(idx) - phraseCount += 1 - - def getStructure(self): - return SpeedChatGMHandler.scStructure - - def getPhrase(self, id): - return SpeedChatGMHandler.scList[id] diff --git a/otp/speedchat/SpeedChatGlobals.py b/otp/speedchat/SpeedChatGlobals.py index 379d9973..d5f8438f 100644 --- a/otp/speedchat/SpeedChatGlobals.py +++ b/otp/speedchat/SpeedChatGlobals.py @@ -1,6 +1,5 @@ from SCTerminal import SCTerminalSelectedEvent from SCTerminal import SCTerminalLinkedEmoteEvent from SCStaticTextTerminal import SCStaticTextMsgEvent -from SCGMTextTerminal import SCGMTextMsgEvent from SCCustomTerminal import SCCustomMsgEvent from SCEmoteTerminal import SCEmoteMsgEvent, SCEmoteNoAccessEvent diff --git a/otp/speedchat/SpeedChatTypes.py b/otp/speedchat/SpeedChatTypes.py index 17423ce6..229394e1 100644 --- a/otp/speedchat/SpeedChatTypes.py +++ b/otp/speedchat/SpeedChatTypes.py @@ -6,7 +6,6 @@ from SCTerminal import SCTerminal from SCCustomMenu import SCCustomMenu from SCEmoteMenu import SCEmoteMenu from SCStaticTextTerminal import SCStaticTextTerminal -from SCGMTextTerminal import SCGMTextTerminal from SCCustomTerminal import SCCustomTerminal from SCEmoteTerminal import SCEmoteTerminal from SCColorScheme import SCColorScheme diff --git a/otp/uberdog/RejectCode.py b/otp/uberdog/RejectCode.py deleted file mode 100644 index eab2c714..00000000 --- a/otp/uberdog/RejectCode.py +++ /dev/null @@ -1,3 +0,0 @@ -class RejectCode: - FRIENDS_LIST_FULL = 60005 - INVITATION_DECLINED = 60008 \ No newline at end of file diff --git a/otp/uberdog/__init__.py b/otp/uberdog/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/toontown/chat/TTChatInputWhiteList.py b/toontown/chat/TTChatInputWhiteList.py index 60a9a3ca..4fbee6b0 100644 --- a/toontown/chat/TTChatInputWhiteList.py +++ b/toontown/chat/TTChatInputWhiteList.py @@ -117,8 +117,6 @@ class TTChatInputWhiteList(ChatInputWhiteListFrame): base.talkAssistant.sendOpenTalk(text) elif self.receiverId and not self.toPlayer: base.talkAssistant.sendWhisperTalk(text, self.receiverId) - elif self.receiverId and self.toPlayer: - base.talkAssistant.sendAccountTalk(text, self.receiverId) def sendWhisperByFriend(self, avatarId, text): online = 0 diff --git a/toontown/friends/FriendInviter.py b/toontown/friends/FriendInviter.py index 73f00d2c..8795dcf2 100644 --- a/toontown/friends/FriendInviter.py +++ b/toontown/friends/FriendInviter.py @@ -13,7 +13,6 @@ from toontown.suit import Suit from toontown.pets import Pet from otp.otpbase import OTPLocalizer from otp.otpbase import OTPGlobals -from otp.uberdog import RejectCode globalFriendInviter = None def showFriendInviter(avId, avName, avDisableName): @@ -517,14 +516,7 @@ class FriendInviter(DirectFrame): self.fsm.request('maybe') def __playerFriendRejectResponse(self, avId, reason): - self.notify.debug('Got reject response to friendResponse: %s' % reason) - if reason == RejectCode.RejectCode.INVITATION_DECLINED: - self.fsm.request('no') - elif reason == RejectCode.RejectCode.FRIENDS_LIST_FULL: - self.fsm.request('otherTooMany') - else: - self.notify.warning('Got unexpected response to friendResponse: %s' % reason) - self.fsm.request('maybe') + self.fsm.request('maybe') def __playerFriendAcceptResponse(self): self.fsm.request('yes') diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 20aa9208..9969dc84 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -471,29 +471,6 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): whisper.manage(base.marginManager) base.playSfx(sfx) - def displayTalkAccount(self, fromId, senderName, rawString, mods): - sender = None - playerInfo = None - sfx = self.soundWhisper - playerInfo = base.cr.playerFriendsManager.playerId2Info.get(fromId, None) - if playerInfo == None: - return - senderAvId = base.cr.playerFriendsManager.findAvIdFromPlayerId(fromId) - if not senderName and base.cr.playerFriendsManager.playerId2Info.get(fromId): - senderName = base.cr.playerFriendsManager.playerId2Info.get(fromId).playerName - senderAvatar = base.cr.identifyAvatar(senderAvId) - if sender: - chatString, scrubbed = senderAvatar.scrubTalk(rawString, mods) - else: - chatString, scrubbed = self.scrubTalk(rawString, mods) - chatString = senderName + ': ' + chatString - whisper = WhisperPopup(chatString, OTPGlobals.getInterfaceFont(), WTNormal) - if playerInfo != None: - whisper.setClickable(senderName, fromId, 1) - whisper.manage(base.marginManager) - base.playSfx(sfx) - return - def isLocal(self): return 1