Renamed Secrets to True Friends, finish removing, remove Secrets button from friends list (it's only going to be on the toon avatar panel), fix 30000 jb bank, fix treasure chest GUI

This commit is contained in:
DenialMC 2015-05-13 15:49:17 +03:00
parent 8cbdbc1628
commit 1c2548283b
12 changed files with 60 additions and 114 deletions

View file

@ -210,10 +210,6 @@ dclass FriendManager : DistributedObject {
friendResponse(int8, int32); friendResponse(int8, int32);
inviteeFriendQuery(int32, string, blob, int32); inviteeFriendQuery(int32, string, blob, int32);
inviteeCancelFriendQuery(int32); inviteeCancelFriendQuery(int32);
requestSecret() airecv clsend;
requestSecretResponse(int8, string);
submitSecret(string(0-256)) airecv clsend;
submitSecretResponse(int8, int32);
}; };
struct leaderBoardRecordResponces { struct leaderBoardRecordResponces {

View file

@ -43,8 +43,8 @@ class ChatManager(DirectObject.DirectObject):
self.wantBackgroundFocus = 1 self.wantBackgroundFocus = 1
self.__scObscured = 0 self.__scObscured = 0
self.__normalObscured = 0 self.__normalObscured = 0
self.noSecretChatAtAll = None self.noTrueFriendsAtAll = None
self.noSecretChatAtAllAndNoWhitelist = None self.noTrueFriendsAtAllAndNoWhitelist = None
self.fsm = ClassicFSM.ClassicFSM('chatManager', [State.State('off', self.enterOff, self.exitOff), self.fsm = ClassicFSM.ClassicFSM('chatManager', [State.State('off', self.enterOff, self.exitOff),
State.State('mainMenu', self.enterMainMenu, self.exitMainMenu), State.State('mainMenu', self.enterMainMenu, self.exitMainMenu),
State.State('speedChat', self.enterSpeedChat, self.exitSpeedChat), State.State('speedChat', self.enterSpeedChat, self.exitSpeedChat),
@ -52,8 +52,8 @@ class ChatManager(DirectObject.DirectObject):
State.State('whisper', self.enterWhisper, self.exitWhisper), State.State('whisper', self.enterWhisper, self.exitWhisper),
State.State('whisperChat', self.enterWhisperChat, self.exitWhisperChat), State.State('whisperChat', self.enterWhisperChat, self.exitWhisperChat),
State.State('whisperSpeedChat', self.enterWhisperSpeedChat, self.exitWhisperSpeedChat), State.State('whisperSpeedChat', self.enterWhisperSpeedChat, self.exitWhisperSpeedChat),
State.State('noSecretChatAtAll', self.enterNoSecretChatAtAll, self.exitNoSecretChatAtAll), State.State('noTrueFriendsAtAll', self.enterNoTrueFriendsAtAll, self.exitNoTrueFriendsAtAll),
State.State('noSecretChatAtAllAndNoWhitelist', self.enterNoSecretChatAtAllAndNoWhitelist, self.exitNoSecretChatAtAllAndNoWhitelist), State.State('noTrueFriendsAtAllAndNoWhitelist', self.enterNoTrueFriendsAtAllAndNoWhitelist, self.exitNoTrueFriendsAtAllAndNoWhitelist),
State.State('otherDialog', self.enterOtherDialog, self.exitOtherDialog), State.State('otherDialog', self.enterOtherDialog, self.exitOtherDialog),
State.State('whiteListOpenChat', self.enterWhiteListOpenChat, self.exitWhiteListOpenChat), State.State('whiteListOpenChat', self.enterWhiteListOpenChat, self.exitWhiteListOpenChat),
State.State('whiteListAvatarChat', self.enterWhiteListAvatarChat, self.exitWhiteListAvatarChat)], 'off', 'off') State.State('whiteListAvatarChat', self.enterWhiteListAvatarChat, self.exitWhiteListAvatarChat)], 'off', 'off')
@ -69,12 +69,12 @@ class ChatManager(DirectObject.DirectObject):
del self.chatInputNormal del self.chatInputNormal
self.chatInputSpeedChat.delete() self.chatInputSpeedChat.delete()
del self.chatInputSpeedChat del self.chatInputSpeedChat
if self.noSecretChatAtAll: if self.noTrueFriendsAtAll:
self.noSecretChatAtAll.destroy() self.noTrueFriendsAtAll.destroy()
self.noSecretChatAtAll = None self.noTrueFriendsAtAll = None
if self.noSecretChatAtAllAndNoWhitelist: if self.noTrueFriendsAtAllAndNoWhitelist:
self.noSecretChatAtAllAndNoWhitelist.destroy() self.noTrueFriendsAtAllAndNoWhitelist.destroy()
self.noSecretChatAtAllAndNoWhitelist = None self.noTrueFriendsAtAllAndNoWhitelist = None
del self.localAvatar del self.localAvatar
del self.cr del self.cr
return return
@ -280,17 +280,17 @@ class ChatManager(DirectObject.DirectObject):
def exitNormalChat(self): def exitNormalChat(self):
self.chatInputNormal.deactivate() self.chatInputNormal.deactivate()
def enterNoSecretChatAtAll(self): def enterNoTrueFriendsAtAll(self):
self.notify.error('called enterNoSecretChatAtAll() on parent class') self.notify.error('called enterNoTrueFriendsAtAll() on parent class')
def exitNoSecretChatAtAll(self): def exitNoTrueFriendsAtAll(self):
self.notify.error('called exitNoSecretChatAtAll() on parent class') self.notify.error('called exitNoTrueFriendsAtAll() on parent class')
def enterNoSecretChatAtAllAndNoWhitelist(self): def enterNoTrueFriendsAtAllAndNoWhitelist(self):
self.notify.error('called enterNoSecretChatAtAllAndNoWhitelist() on parent class') self.notify.error('called enterNoTrueFriendsAtAllAndNoWhitelist() on parent class')
def exitNoSecretChatAtAllAndNoWhitelist(self): def exitNoTrueFriendsAtAllAndNoWhitelist(self):
self.notify.error('called exitNoSecretChatAtAllAndNoWhitelist() on parent class') self.notify.error('called exitNoTrueFriendsAtAllAndNoWhitelist() on parent class')
def enterOtherDialog(self): def enterOtherDialog(self):
pass pass

View file

@ -2,7 +2,7 @@
from pandac.PandaModules import * from pandac.PandaModules import *
hashVal = 4170776848L hashVal = 4085944463L
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 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

View file

@ -48,12 +48,12 @@ ChatManagerWhisperToName = 'Whisper To:\n%s'
ChatManagerCancel = lCancel ChatManagerCancel = lCancel
ChatManagerWhisperOffline = '%s is offline.' ChatManagerWhisperOffline = '%s is offline.'
# True Friends # True Friends
NoSecretChatAtAllTitle = 'Open Chat With True Friends' NoTrueFriendsAtAllTitle = 'Open Chat With True Friends'
NoSecretChatAtAll = 'Open Chat with True Friends allows real-life friends to chat openly with each other by means of a True Friend Code that must be shared outside of the game.\n\nTo activate these features or to learn more, exit Toontown and then click on Membership and select Manage Account. Log in to edit your "Community Settings."' NoTrueFriendsAtAll = 'Open Chat with True Friends allows real-life friends to chat openly with each other by means of a True Friend Code that must be shared outside of the game.\n\nTo activate these features or to learn more, exit Toontown and then click on Membership and select Manage Account. Log in to edit your "Community Settings."'
# Speedchat Plus # Speedchat Plus
NoSecretChatAtAllAndNoWhitelistTitle = 'Chat Button' NoTrueFriendsAtAllAndNoWhitelistTitle = 'Chat Button'
NoSecretChatAtAllAndNoWhitelist = 'You can use the blue Chat button to communicate with other Toons by using Speechat Plus or Open Chat with True Friends.\n\nSpeedchat Plus is a form of type chat that allows users to communicate by using the SpeedChat Plus dictionary.\n\nOpen Chat with True Friends allows real-life friends to chat openly with each other by means of a True Friend Code that must be shared outside of the game.\n\nTo activate these features or to learn more, exit Toontown and then click on Membership and select Manage Account. Log in to edit your "Community Settings."' NoTrueFriendsAtAllAndNoWhitelist = 'You can use the blue Chat button to communicate with other Toons by using Speechat Plus or Open Chat with True Friends.\n\nSpeedchat Plus is a form of type chat that allows users to communicate by using the SpeedChat Plus dictionary.\n\nOpen Chat with True Friends allows real-life friends to chat openly with each other by means of a True Friend Code that must be shared outside of the game.\n\nTo activate these features or to learn more, exit Toontown and then click on Membership and select Manage Account. Log in to edit your "Community Settings."'
NoSecretChatAtAllOK = lOK NoTrueFriendsAtAllOK = lOK
WhisperToFormat = 'To %s %s' WhisperToFormat = 'To %s %s'
WhisperToFormatName = 'To %s' WhisperToFormatName = 'To %s'
WhisperFromFormatName = '%s whispers' WhisperFromFormatName = '%s whispers'
@ -2252,7 +2252,7 @@ AvatarDetailPanelOnline = 'District: %(district)s\nLocation: %(location)s'
AvatarDetailPanelOffline = 'District: offline\nLocation: offline' AvatarDetailPanelOffline = 'District: offline\nLocation: offline'
AvatarPanelFriends = 'Friends' AvatarPanelFriends = 'Friends'
AvatarPanelWhisper = 'Whisper' AvatarPanelWhisper = 'Whisper'
AvatarPanelSecrets = 'True Friends' AvatarPanelTrueFriends = 'True Friends'
AvatarPanelGoTo = 'Go To' AvatarPanelGoTo = 'Go To'
AvatarPanelIgnore = 'Ignore' AvatarPanelIgnore = 'Ignore'
AvatarPanelStopIgnore = 'Stop Ignoring' AvatarPanelStopIgnore = 'Stop Ignoring'

View file

@ -93,19 +93,19 @@ class ToontownChatManager(ChatManager.ChatManager):
else: else:
ChatManager.ChatManager.enterMainMenu(self) ChatManager.ChatManager.enterMainMenu(self)
def enterNoSecretChatAtAll(self): def enterNoTrueFriendsAtAll(self):
if self.noSecretChatAtAll == None: if self.noTrueFriendsAtAll == None:
buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui') buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')) okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr'))
self.noSecretChatAtAll = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.2), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.1), text=OTPLocalizer.NoSecretChatAtAll, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.3)) self.noTrueFriendsAtAll = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.2), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.1), text=OTPLocalizer.NoTrueFriendsAtAll, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.3))
DirectLabel(parent=self.noSecretChatAtAll, relief=None, pos=(0, 0, 0.4), text=OTPLocalizer.NoSecretChatAtAllTitle, textMayChange=0, text_scale=0.08) DirectLabel(parent=self.noTrueFriendsAtAll, relief=None, pos=(0, 0, 0.4), text=OTPLocalizer.NoTrueFriendsAtAllTitle, textMayChange=0, text_scale=0.08)
DirectButton(self.noSecretChatAtAll, image=okButtonImage, relief=None, text=OTPLocalizer.NoSecretChatAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.4), command=self.__handleNoSecretChatAtAllOK) DirectButton(self.noTrueFriendsAtAll, image=okButtonImage, relief=None, text=OTPLocalizer.NoTrueFriendsAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.4), command=self.__handleNoTrueFriendsAtAllOK)
buttons.removeNode() buttons.removeNode()
self.noSecretChatAtAll.show() self.noTrueFriendsAtAll.show()
return return
def exitNoSecretChatAtAll(self): def exitNoTrueFriendsAtAll(self):
self.noSecretChatAtAll.hide() self.noTrueFriendsAtAll.hide()
def __normalButtonPressed(self): def __normalButtonPressed(self):
if base.config.GetBool('want-qa-regression', 0): if base.config.GetBool('want-qa-regression', 0):
@ -143,19 +143,19 @@ class ToontownChatManager(ChatManager.ChatManager):
self.fsm.request('mainMenu') self.fsm.request('mainMenu')
return return
def enterNoSecretChatAtAllAndNoWhitelist(self): def enterNoTrueFriendsAtAllAndNoWhitelist(self):
if self.noSecretChatAtAllAndNoWhitelist == None: if self.noTrueFriendsAtAllAndNoWhitelist == None:
buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui') buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')) okButtonImage = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr'))
self.noSecretChatAtAllAndNoWhitelist = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.05), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.58), text=OTPLocalizer.NoSecretChatAtAllAndNoWhitelist, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.55)) self.noTrueFriendsAtAllAndNoWhitelist = DirectFrame(parent=aspect2dp, pos=(0.0, 0.1, 0.05), relief=None, image=DGG.getDefaultDialogGeom(), image_color=OTPGlobals.GlobalDialogColor, image_scale=(1.4, 1.0, 1.58), text=OTPLocalizer.NoTrueFriendsAtAllAndNoWhitelist, text_wordwrap=20, textMayChange=0, text_scale=0.06, text_pos=(0, 0.55))
DirectLabel(parent=self.noSecretChatAtAllAndNoWhitelist, relief=None, pos=(0, 0, 0.67), text=OTPLocalizer.NoSecretChatAtAllAndNoWhitelistTitle, textMayChange=0, text_scale=0.08) DirectLabel(parent=self.noTrueFriendsAtAllAndNoWhitelist, relief=None, pos=(0, 0, 0.67), text=OTPLocalizer.NoTrueFriendsAtAllAndNoWhitelistTitle, textMayChange=0, text_scale=0.08)
DirectButton(self.noSecretChatAtAllAndNoWhitelist, image=okButtonImage, relief=None, text=OTPLocalizer.NoSecretChatAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.64), command=self.__handleNoSecretChatAtAllOK) DirectButton(self.noTrueFriendsAtAllAndNoWhitelist, image=okButtonImage, relief=None, text=OTPLocalizer.NoTrueFriendsAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.64), command=self.__handleNoTrueFriendsAtAllOK)
buttons.removeNode() buttons.removeNode()
self.noSecretChatAtAllAndNoWhitelist.show() self.noTrueFriendsAtAllAndNoWhitelist.show()
return return
def exitNoSecretChatAtAllAndNoWhitelist(self): def exitNoTrueFriendsAtAllAndNoWhitelist(self):
self.noSecretChatAtAllAndNoWhitelist.hide() self.noTrueFriendsAtAllAndNoWhitelist.hide()
def __whisperScButtonPressed(self, avatarName, avatarId): def __whisperScButtonPressed(self, avatarName, avatarId):
messenger.send('wakeup') messenger.send('wakeup')
@ -168,7 +168,7 @@ class ToontownChatManager(ChatManager.ChatManager):
def __whisperCancelPressed(self): def __whisperCancelPressed(self):
self.fsm.request('mainMenu') self.fsm.request('mainMenu')
def __handleNoSecretChatAtAllOK(self): def __handleNoTrueFriendsAtAllOK(self):
self.fsm.request('mainMenu') self.fsm.request('mainMenu')
def messageSent(self): def messageSent(self):

View file

@ -138,10 +138,6 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
gui.find('**/Horiz_Arrow_Rllvr'), gui.find('**/Horiz_Arrow_Rllvr'),
gui.find('**/Horiz_Arrow_UP')), image3_color=Vec4(0.6, 0.6, 0.6, 0.6), pos=(0.17, 0, -0.38), command=self.__right) gui.find('**/Horiz_Arrow_UP')), image3_color=Vec4(0.6, 0.6, 0.6, 0.6), pos=(0.17, 0, -0.38), command=self.__right)
self.newFriend = DirectButton(parent=self, relief=None, pos=(-0.14, 0.0, 0.14), image=(auxGui.find('**/Frnds_Btn_UP'), auxGui.find('**/Frnds_Btn_DN'), auxGui.find('**/Frnds_Btn_RLVR')), text=('', TTLocalizer.FriendsListPanelNewFriend, TTLocalizer.FriendsListPanelNewFriend), text_scale=TTLocalizer.FLPnewFriend, text_fg=(0, 0, 0, 1), text_bg=(1, 1, 1, 1), text_pos=(0.1, -0.085), textMayChange=0, command=self.__newFriend) self.newFriend = DirectButton(parent=self, relief=None, pos=(-0.14, 0.0, 0.14), image=(auxGui.find('**/Frnds_Btn_UP'), auxGui.find('**/Frnds_Btn_DN'), auxGui.find('**/Frnds_Btn_RLVR')), text=('', TTLocalizer.FriendsListPanelNewFriend, TTLocalizer.FriendsListPanelNewFriend), text_scale=TTLocalizer.FLPnewFriend, text_fg=(0, 0, 0, 1), text_bg=(1, 1, 1, 1), text_pos=(0.1, -0.085), textMayChange=0, command=self.__newFriend)
self.secrets = DirectButton(parent=self, relief=None, pos=TTLocalizer.FLPsecretsPos, image=(auxGui.find('**/ChtBx_ChtBtn_UP'), auxGui.find('**/ChtBx_ChtBtn_DN'), auxGui.find('**/ChtBx_ChtBtn_RLVR')), text=('',
TTLocalizer.FriendsListPanelSecrets,
TTLocalizer.FriendsListPanelSecrets,
''), text_scale=TTLocalizer.FLPsecrets, text_fg=(0, 0, 0, 1), text_bg=(1, 1, 1, 1), text_pos=(-0.04, -0.085), textMayChange=0, command=self.__secrets)
gui.removeNode() gui.removeNode()
auxGui.removeNode() auxGui.removeNode()
return return
@ -244,10 +240,6 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
self.__updateTitle() self.__updateTitle()
self.__updateArrows() self.__updateArrows()
def __secrets(self):
messenger.send('wakeup')
# TODO
def __newFriend(self): def __newFriend(self):
messenger.send('wakeup') messenger.send('wakeup')
messenger.send('friendAvatar', [None, None, None]) messenger.send('friendAvatar', [None, None, None])

View file

@ -131,18 +131,6 @@ class TTUFriendsManager(DistributedObjectGlobal):
if toon: if toon:
base.localAvatar.setTalkWhisper(fromId, 0, toon.getName(), message, [], 0) base.localAvatar.setTalkWhisper(fromId, 0, toon.getName(), message, [], 0)
def d_requestSecret(self):
self.sendUpdate('requestSecret', [])
def requestSecretResponse(self, result, secret):
messenger.send('requestSecretResponse', [result, secret])
def d_submitSecret(self, secret):
self.sendUpdate('submitSecret', [secret])
def submitSecretResponse(self, result, avId):
messenger.send('submitSecretResponse', [result, avId])
def d_battleSOS(self, toId): def d_battleSOS(self, toId):
self.sendUpdate('battleSOS', [toId]) self.sendUpdate('battleSOS', [toId])

View file

@ -1,12 +1,8 @@
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
from direct.distributed.PyDatagram import * from direct.distributed.PyDatagram import *
from direct.task import Task
from direct.directnotify.DirectNotifyGlobal import directNotify
import string
import random
import functools
import time
from direct.fsm.FSM import FSM from direct.fsm.FSM import FSM
import time
# -- FSMS -- # -- FSMS --
class OperationFSM(FSM): class OperationFSM(FSM):
@ -199,7 +195,6 @@ class TTUFriendsManagerUD(DistributedObjectGlobalUD):
self.tpRequests = {} self.tpRequests = {}
self.whisperRequests = {} self.whisperRequests = {}
self.operations = [] self.operations = []
self.secret2avId = {}
self.delayTime = 1.0 self.delayTime = 1.0
# -- Friends list -- # -- Friends list --
@ -397,31 +392,6 @@ class TTUFriendsManagerUD(DistributedObjectGlobalUD):
self.sendUpdateToAvatarId(toId, 'receiveTalkWhisper', [fromId, message]) self.sendUpdateToAvatarId(toId, 'receiveTalkWhisper', [fromId, message])
self.air.writeServerEvent('whisper-said', fromId, toId, message) self.air.writeServerEvent('whisper-said', fromId, toId, message)
# -- Secret Friends --
def requestSecret(self):
avId = self.air.getAvatarIdFromSender()
allowed = string.lowercase + string.digits
secret = ''
for i in xrange(6):
secret += random.choice(allowed)
if i == 2:
secret += ' '
self.secret2avId[secret] = avId
self.sendUpdateToAvatarId(avId, 'requestSecretResponse', [1, secret])
def submitSecret(self, secret):
requester = self.air.getAvatarIdFromSender()
owner = self.secret2avId.get(secret)
if not owner:
self.sendUpdateToAvatarId(requester, 'submitSecretResponse', [0, 0])
return
if owner == requester:
del self.secret2avId[secret]
self.sendUpdateToAvatarId(requester, 'submitSecretResponse', [3, 0])
return
self.sendUpdateToAvatarId(requester, 'submitSecretResponse', [5, 0])
# -- Routes -- # -- Routes --
def battleSOS(self, toId): def battleSOS(self, toId):
requester = self.air.getAvatarIdFromSender() requester = self.air.getAvatarIdFromSender()

View file

@ -170,7 +170,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
if base.localAvatar.isIgnored(self.avId): if base.localAvatar.isIgnored(self.avId):
self.whisperButton['state'] = DGG.DISABLED self.whisperButton['state'] = DGG.DISABLED
self.secretsButton = DirectButton( self.trueFriendsButton = DirectButton(
parent=self.frame, parent=self.frame,
image=( image=(
gui.find('**/Amuse_Btn_UP'), gui.find('**/Amuse_Btn_UP'),
@ -181,20 +181,18 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
image_scale=0.9, image_scale=0.9,
relief=None, relief=None,
pos=(-0.103, 0, -0.13), pos=(-0.103, 0, -0.13),
text=TTLocalizer.AvatarPanelSecrets, text=TTLocalizer.AvatarPanelTrueFriends,
text0_fg=self.text0Color, text0_fg=self.text0Color,
text1_fg=self.text1Color, text1_fg=self.text1Color,
text2_fg=self.text2Color, text2_fg=self.text2Color,
text3_fg=self.text3Color, text3_fg=self.text3Color,
text_scale=TTLocalizer.TAPsecretsButton, text_scale=TTLocalizer.TAPtruefriendsButton,
text_pos=(0.055, -0.01), text_pos=(0.055, -0.01),
text_align=TextNode.ALeft, text_align=TextNode.ALeft,
command=self.__handleSecrets) command=self.__handleTrueFriends)
if base.localAvatar.isIgnored(self.avId): if base.localAvatar.isIgnored(self.avId):
self.secretsButton['state'] = DGG.DISABLED self.trueFriendsButton['state'] = DGG.DISABLED
ignoreStr, ignoreCmd, ignoreScale = self.getIgnoreButtonInfo() ignoreStr, ignoreCmd, ignoreScale = self.getIgnoreButtonInfo()
self.ignoreButton = DirectButton( self.ignoreButton = DirectButton(
@ -294,7 +292,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
self.reportButton['state'] = DGG.DISABLED self.reportButton['state'] = DGG.DISABLED
self.ignoreButton['state'] = DGG.DISABLED self.ignoreButton['state'] = DGG.DISABLED
self.goToButton['state'] = DGG.DISABLED self.goToButton['state'] = DGG.DISABLED
self.secretsButton['state'] = DGG.DISABLED self.trueFriendsButton['state'] = DGG.DISABLED
self.whisperButton['state'] = DGG.DISABLED self.whisperButton['state'] = DGG.DISABLED
self.petButton['state'] = DGG.DISABLED self.petButton['state'] = DGG.DISABLED
self.friendButton['state'] = DGG.DISABLED self.friendButton['state'] = DGG.DISABLED
@ -366,7 +364,7 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
def __handleWhisper(self): def __handleWhisper(self):
base.localAvatar.chatMgr.whisperTo(self.avName, self.avId) base.localAvatar.chatMgr.whisperTo(self.avName, self.avId)
def __handleSecrets(self): def __handleTrueFriends(self):
base.localAvatar.chatMgr.noWhisper() base.localAvatar.chatMgr.noWhisper()
# TODO # TODO

View file

@ -1904,7 +1904,7 @@ AvatarDetailPanelOffline = 'District: offline\nLocation: offline'
OfflineLocation = 'Offline' OfflineLocation = 'Offline'
AvatarPanelFriends = 'Friends' AvatarPanelFriends = 'Friends'
AvatarPanelWhisper = 'Whisper' AvatarPanelWhisper = 'Whisper'
AvatarPanelSecrets = 'True Friends' AvatarPanelTrueFriends = 'True Friends'
AvatarPanelGoTo = 'Go To' AvatarPanelGoTo = 'Go To'
AvatarPanelPet = 'Show Doodle' AvatarPanelPet = 'Show Doodle'
AvatarPanelIgnore = 'Ignore' AvatarPanelIgnore = 'Ignore'
@ -3238,7 +3238,6 @@ ScientistPhase6Dialogue = ['Congratulations Toons!',
'So in the meantime, keep up the Cog fight...', 'So in the meantime, keep up the Cog fight...',
'And enjoy the silliest place ever, Toontown!'] 'And enjoy the silliest place ever, Toontown!']
FriendsListPanelNewFriend = 'New Friend' FriendsListPanelNewFriend = 'New Friend'
FriendsListPanelSecrets = 'True Friend'
FriendsListPanelOnlineFriends = 'ONLINE TOON\nFRIENDS' FriendsListPanelOnlineFriends = 'ONLINE TOON\nFRIENDS'
FriendsListPanelAllFriends = 'ALL TOON\nFRIENDS' FriendsListPanelAllFriends = 'ALL TOON\nFRIENDS'
FriendsListPanelPets = 'NEARBY\nPETS' FriendsListPanelPets = 'NEARBY\nPETS'

View file

@ -42,17 +42,20 @@ DGGGscoreLabel = 0.075
FPvaluePos = (0, 0, -0.35) FPvaluePos = (0, 0, -0.35)
FPvalue = 0.05 FPvalue = 0.05
FPinfo = 0.055 FPinfo = 0.055
FSGUIdirectFrame = 0.06
FSGUIcancelButton = 0.06
FSGUIokButton = 0.06
GTenterPage2Wordwrap = 13.5 GTenterPage2Wordwrap = 13.5
GTenterPage4Wordwrap = 16.5 GTenterPage4Wordwrap = 16.5
BCGjpText = 0.04 BCGjpText = 0.04
BCGjpTextWordwrap = 10.5 BCGjpTextWordwrap = 10.5
BCGnextGame = 1.71 BCGnextGame = 1.71
FSGUIokButton = 0.06
FSGUIcancelButton = 0.06
FPnewEntry = 0.08 FPnewEntry = 0.08
FPnewRecord = 0.08 FPnewRecord = 0.08
GPgenus = 0.045 GPgenus = 0.045
FLPnewFriend = 0.045 FLPnewFriend = 0.045
FLPsecrets = 0.045
FLPsecretsPos = (0.152, 0.0, 0.14)
FLPtitle = 0.04 FLPtitle = 0.04
FIbStop = 0.05 FIbStop = 0.05
FIdirectFrame = 0.06 FIdirectFrame = 0.06
@ -250,7 +253,7 @@ GPtrophyTabPos = (0.92, 0, -0.3)
APBdialog = 0.06 APBdialog = 0.06
APBdirectLabelPosY = 0 APBdirectLabelPosY = 0
TAPwhisperButton = 0.06 TAPwhisperButton = 0.06
TAPsecretsButton = 0.045 TAPtruefriendsButton = 0.045
TAPgroupFrame = 0.05 TAPgroupFrame = 0.05
TAPgroupButton = 0.055 TAPgroupButton = 0.055
TADPbCancel = 0.05 TADPbCancel = 0.05
@ -267,7 +270,7 @@ INrunButton = 0.05
INdetailNameLabel = 1.0 INdetailNameLabel = 1.0
INfireButton = 0.05 INfireButton = 0.05
NPCFimgLabel = 1.0 NPCFimgLabel = 1.0
PIPsecretsButton = 0.045 PIPtrueFriendsButton = 0.045
PIPwisperButton = 0.06 PIPwisperButton = 0.06
PIPdetailButton = 0.05 PIPdetailButton = 0.05
TLStip = 0.18 TLStip = 0.18

View file

@ -1565,7 +1565,7 @@ AnimPropTypes = Enum(('Unknown',
'Trashcan'), start=-1) 'Trashcan'), start=-1)
EmblemTypes = Enum(('Silver', 'Gold')) EmblemTypes = Enum(('Silver', 'Gold'))
NumEmblemTypes = 2 NumEmblemTypes = 2
MaxBankMoney = 25000 MaxBankMoney = 30000
DefaultBankItemId = 1300 DefaultBankItemId = 1300
ToonAnimStates = set(['off', ToonAnimStates = set(['off',
'neutral', 'neutral',