More holocaust

This commit is contained in:
DenialMC 2015-04-23 01:17:51 +03:00
parent b2f2e96716
commit c3ac8aff07
20 changed files with 8 additions and 249 deletions

View file

@ -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

View file

@ -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

View file

@ -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'

View file

@ -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)

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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])

View file

@ -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.'

View file

@ -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])

View file

@ -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

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -1,3 +0,0 @@
class RejectCode:
FRIENDS_LIST_FULL = 60005
INVITATION_DECLINED = 60008

View file

@ -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

View file

@ -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')

View file

@ -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