mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Do more true friends stuff (Please, fix async Denial)
This commit is contained in:
parent
170718fc80
commit
9d042186b7
6 changed files with 14 additions and 19 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue