Furniture button is now hidden when on the phone

This commit is contained in:
John 2015-08-29 16:23:40 +03:00
parent e2c4f64f22
commit 7bb4b60bd2
6 changed files with 22 additions and 17 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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