diff --git a/astron/dclass/united.dc b/astron/dclass/united.dc index 96178566..9cd255fa 100644 --- a/astron/dclass/united.dc +++ b/astron/dclass/united.dc @@ -3616,11 +3616,14 @@ dclass AwardManager : DistributedObjectGlobal { }; dclass TTCodeRedemptionMgr : DistributedObject { + redeemCode(char [0-256]) airecv clsend; redeemCodeResult(uint32); }; dclass TrueFriendsMgr : DistributedObject { + requestId() airecv clsend; requestIdResult(uint32, string, string); + redeemId(string) airecv clsend; redeemIdResult(uint32, string); }; diff --git a/otp/distributed/DCClassImports.py b/otp/distributed/DCClassImports.py index e417b112..2f4951de 100644 --- a/otp/distributed/DCClassImports.py +++ b/otp/distributed/DCClassImports.py @@ -2,7 +2,7 @@ from pandac.PandaModules import * -hashVal = 2680034445L +hashVal = 2686599263L 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 diff --git a/toontown/friends/ToontownFriendSecret.py b/toontown/friends/ToontownFriendSecret.py index de74719d..4960a1e9 100644 --- a/toontown/friends/ToontownFriendSecret.py +++ b/toontown/friends/ToontownFriendSecret.py @@ -35,6 +35,8 @@ class ToontownFriendSecret(DirectFrame): def __init__(self): DirectFrame.__init__(self, parent=aspect2dp, pos=(0, 0, 0.3), relief=None, image=DGG.getDefaultDialogGeom(), image_scale=(1.6, 1, 1.4), image_pos=(0, 0, -0.05), image_color=OTPGlobals.GlobalDialogColor, borderWidth=(0.01, 0.01)) self.initialiseoptions(ToontownFriendSecret) + self.isLoaded = 0 + self.isEntered = 0 def unload(self): if self.isLoaded == 0: @@ -59,7 +61,7 @@ class ToontownFriendSecret(DirectFrame): self.introText = DirectLabel(parent=self, relief=None, pos=(0, 0, 0.4), scale=0.05, text=TTLocalizer.FriendSecretIntro, text_fg=(0, 0, 0, 1), text_wordwrap=30) self.introText.hide() guiButton = loader.loadModel('phase_3/models/gui/quit_button') - self.getSecret = DirectButton(parent=self, relief=None, pos=(0, 0, -0.11), image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), image_scale=TTLocalizer.FSgetSecret, text=TTLocalizer.FriendSecretGetSecret, text_scale=TTLocalizer.FSgetSecretButton, text_pos=(0, -0.02), command=self.getSecret) + self.getSecret = DirectButton(parent=self, relief=None, pos=(0, 0, -0.11), image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), image_scale=TTLocalizer.FSgetSecret, text=TTLocalizer.FriendSecretGetSecret, text_scale=TTLocalizer.FSgetSecretButton, text_pos=(0, -0.02), command=self.__getSecret) self.getSecret.hide() self.enterSecretText = DirectLabel(parent=self, relief=None, pos=TTLocalizer.FSenterSecretTextPos, scale=0.05, text=TTLocalizer.FriendSecretEnterSecret, text_fg=(0, 0, 0, 1), text_wordwrap=30) self.enterSecretText.hide() @@ -77,7 +79,7 @@ class ToontownFriendSecret(DirectFrame): self.cancel.hide() self.nextText = DirectLabel(parent=self, relief=None, pos=(0, 0, 0.3), scale=0.06, text='', text_scale=TTLocalizer.FSnextText, text_fg=(0, 0, 0, 1), text_wordwrap=25.5) self.nextText.hide() - self.secretText = DirectLabel(parent=self, relief=None, pos=(0, 0, -0.42), scale=0.1, text='', text_fg=(0, 0, 0, 1), text_wordwrap=30) + self.secretText = DirectLabel(parent=self, relief=None, pos=(0, 0, -0.42), scale=0.05, text='', text_fg=(0, 0, 0, 1), text_wordwrap=30) self.secretText.hide() guiButton.removeNode() @@ -152,12 +154,14 @@ class ToontownFriendSecret(DirectFrame): self.exit() return - base.cr.trueFriendsMgr.redeemId(secret, self.gotResponse) + self.__cleanupFirstPage() self.nextText['text'] = TTLocalizer.FriendSecretTryingSecret + base.cr.trueFriendsMgr.redeemId(secret, self.gotResponse) self.nextText.setPos(0, 0, 0.3) self.nextText.show() + self.cancel.hide() self.ok1.hide() - self.cancel.show() + self.ok2.show() def gotResponse(self, id, name): if id == 0: diff --git a/toontown/friends/TrueFriendsMgrAI.py b/toontown/friends/TrueFriendsMgrAI.py index fc6e3eec..5ea8da6f 100644 --- a/toontown/friends/TrueFriendsMgrAI.py +++ b/toontown/friends/TrueFriendsMgrAI.py @@ -1,6 +1,6 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI -from toontown.uberdog.ClientServiceManagerUD import executeHttpRequestAndLog +from toontown.uberdog.ClientServicesManagerUD import executeHttpRequestAndLog class TrueFriendsMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("TrueFriendsMgrAI") diff --git a/toontown/hood/Place.py b/toontown/hood/Place.py index 75ab1b69..2ba63330 100644 --- a/toontown/hood/Place.py +++ b/toontown/hood/Place.py @@ -188,8 +188,6 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): def exitWalk(self): self.exitFLM() - if not base.cr.isPaid() and base.localAvatar.tutorialAck and not base.cr.whiteListChatEnabled: - base.localAvatar.chatMgr.obscure(1, 0) messenger.send('wakeup') self.walkStateData.exit() self.ignore(self.walkDoneEvent) diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 8fab7d84..c9621cc0 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -518,17 +518,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): return 1 def canChat(self): - if not self.cr.allowAnyTypedChat(): - return 0 - if self.commonChatFlags & (ToontownGlobals.CommonChat | ToontownGlobals.SuperChat): - return 1 - if base.cr.whiteListChatEnabled: - return 1 - for friendId, flags in self.friendsList: - if flags & ToontownGlobals.FriendChat: - return 1 - - return 0 + return 1 def startChat(self): if self.tutorialAck: