From 7bb4b60bd2d22503cf422d697d72684688bb72e4 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 29 Aug 2015 16:23:40 +0300 Subject: [PATCH] Furniture button is now hidden when on the phone --- toontown/coghq/CogHQExterior.py | 2 +- toontown/estate/DistributedPhone.py | 2 ++ toontown/estate/House.py | 2 +- toontown/hood/Place.py | 22 +++++++++++----------- toontown/toon/LocalToon.py | 9 ++++++--- toontown/town/TutorialStreet.py | 2 +- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/toontown/coghq/CogHQExterior.py b/toontown/coghq/CogHQExterior.py index 4e186469..62a87610 100755 --- a/toontown/coghq/CogHQExterior.py +++ b/toontown/coghq/CogHQExterior.py @@ -99,7 +99,7 @@ class CogHQExterior(BattlePlace.BattlePlace): base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) def enterTunnelOut(self, requestStatus): fromZoneId = self.zoneId - self.zoneId % 100 diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py index ca461e18..02813ca7 100755 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -177,6 +177,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): self.notify.debug('Entering Phone Sphere....') taskMgr.remove(self.uniqueName('ringDoLater')) + base.localAvatar.obscureMoveFurnitureButton(1) self.cr.playGame.getPlace().detectedPhoneCollision() self.hasLocalAvatar = 1 self.sendUpdate('avatarEnter', []) @@ -184,6 +185,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): def __handlePhoneDone(self): self.sendUpdate('avatarExit', []) self.ignore(self.phoneGuiDoneEvent) + base.localAvatar.obscureMoveFurnitureButton(0) self.setPos(self.getPos()) self.phoneGui = None diff --git a/toontown/estate/House.py b/toontown/estate/House.py index 7e896de7..25f04538 100755 --- a/toontown/estate/House.py +++ b/toontown/estate/House.py @@ -164,7 +164,7 @@ class House(Place.Place): base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) base.localAvatar.stopSleepWatch() def enterBanking(self): diff --git a/toontown/hood/Place.py b/toontown/hood/Place.py index 65da8cab..c501bb8c 100755 --- a/toontown/hood/Place.py +++ b/toontown/hood/Place.py @@ -292,7 +292,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): self.ignore('bookDone') base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) target = base.cr.doFind('DistributedTarget') if target: target.showGui() @@ -444,13 +444,13 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): def exitDoorIn(self): NametagGlobals.setMasterArrowsOn(1) - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) def enterDoorOut(self): base.localAvatar.obscureMoveFurnitureButton(1) def exitDoorOut(self): - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) base.localAvatar.stopQuestMap() def handleDoorDoneEvent(self, requestStatus): @@ -510,7 +510,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): def exitTeleportOut(self): base.localAvatar.laffMeter.stop() base.localAvatar.stopQuestMap() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) def enterDied(self, requestStatus, callback = None): if callback == None: @@ -527,7 +527,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): def exitDied(self): base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) def getEstateZoneAndGoHome(self, requestStatus): self.doneStatus = requestStatus @@ -645,7 +645,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): self._tiToken = None NametagGlobals.setMasterArrowsOn(1) base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) base.localAvatar.stopUpdateSmartCamera() base.localAvatar.detachCamera() base.localAvatar.stopPosHprBroadcast() @@ -690,7 +690,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) def enterPurchase(self): base.localAvatar.b_setAnimState('neutral', 1) @@ -703,7 +703,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) def enterFishing(self): base.localAvatar.b_setAnimState('neutral', 1) @@ -734,7 +734,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) base.localAvatar.stopSleepWatch() def enterPhone(self): @@ -755,7 +755,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) base.localAvatar.stopSleepWatch() def enterStopped(self): @@ -781,7 +781,7 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager): base.localAvatar.setTeleportAvailable(0) self.ignore('teleportQuery') base.localAvatar.laffMeter.stop() - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0) base.localAvatar.stopSleepWatch() messenger.send('exitingStoppedState') diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index e559abfd..7e80bb59 100755 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -935,8 +935,8 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.friendsListButtonObscured += increment self.refreshOnscreenButtons() - def obscureMoveFurnitureButton(self, increment): - self.moveFurnitureButtonObscured += increment + def obscureMoveFurnitureButton(self, obscured): + self.moveFurnitureButtonObscured = obscured self.refreshOnscreenButtons() def obscureClarabelleButton(self, increment): @@ -971,7 +971,10 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.__catalogNotifyDialog = None else: self.newCatalogNotify() - if self.moveFurnitureButtonObscured <= 0: + if self.moveFurnitureButtonObscured: + if self.__furnitureGui: + self.__furnitureGui.hide() + else: if self.furnitureManager != None and self.furnitureDirector == self.doId: self.loadFurnitureGui() self.__furnitureGui.setPos(0.155, -0.6, -1.045) diff --git a/toontown/town/TutorialStreet.py b/toontown/town/TutorialStreet.py index 1385f1db..8d8af0e3 100755 --- a/toontown/town/TutorialStreet.py +++ b/toontown/town/TutorialStreet.py @@ -19,4 +19,4 @@ class TutorialStreet(TTStreet.TTStreet): TTStreet.TTStreet.handleEnterTunnel(self, requestStatus, collEntry) def exitDoorIn(self): - base.localAvatar.obscureMoveFurnitureButton(-1) + base.localAvatar.obscureMoveFurnitureButton(0)