parameters: (self)
docstring: Disengage and exit the telescope mode
docstring_summary: Disengage and exit the telescope mode
docstring_tokens: Disengage and exit the telescope mode
function: def IQuitTelescope(self):
          "Disengage and exit the telescope mode"
          global LocalAvatar
          global boolScopeOperator
          global Telescope
          global WasPowered
          global exitScope
          global timerWheel
          global tempWheel
  
          exitScope = 1
          Telescope.popTelescope()
          # exit every thing
          
          if WasPowered:
              if Vignette.value:
                  PtHideDialog(Vignette.value)
              virtCam = ptCamera()
              virtCam.restore(Camera.sceneobject.getKey())
              timerWheel.setValue(0)
              RespSfxTimerWheel.run(self.key,state="off")
              tempWheel.setValue(0)
          else:
              if VignetteBad.value:
                  PtHideDialog(VignetteBad.value)
              virtCam = ptCamera()
              virtCam.restore(CameraBad.sceneobject.getKey())
              WasPowered = 1
          
          PtRecenterCamera()
          # exit behavior...which is in the next stage
          #Behavior.gotoStage(LocalAvatar,2)
          Behavior.nextStage(LocalAvatar)
          #disable the Control key events
          PtDisableControlKeyEvents(self.key)
          # re-enable the telescope for someone else to use
          boolScopeOperator = 0
          self.SDL["boolOperated"] = (0,)
          self.SDL["OperatorID"] = (-1,)
          #Re-enable first person camera
          cam = ptCamera()
          cam.enableFirstPersonOverride()
          PtAtTimeCallback(self.key,3,1) # wait for player to finish exit one-shot, then reenable clickable
          PtDebugPrint("ercaOvenScope.IQuitTelescope:\tdelaying clickable reenable",level=kDebugDumpLevel)
function_tokens: def IQuitTelescope ( self ) : global LocalAvatar global boolScopeOperator global Telescope global WasPowered global exitScope global timerWheel global tempWheel exitScope = 1 Telescope . popTelescope ( ) # exit every thing if WasPowered : if Vignette . value : PtHideDialog ( Vignette . value ) virtCam = ptCamera ( ) virtCam . restore ( Camera . sceneobject . getKey ( ) ) timerWheel . setValue ( 0 ) RespSfxTimerWheel . run ( self . key , state = "off" ) tempWheel . setValue ( 0 ) else : if VignetteBad . value : PtHideDialog ( VignetteBad . value ) virtCam = ptCamera ( ) virtCam . restore ( CameraBad . sceneobject . getKey ( ) ) WasPowered = 1 PtRecenterCamera ( ) # exit behavior...which is in the next stage #Behavior.gotoStage(LocalAvatar,2) Behavior . nextStage ( LocalAvatar ) #disable the Control key events PtDisableControlKeyEvents ( self . key ) # re-enable the telescope for someone else to use boolScopeOperator = 0 self . SDL [ "boolOperated" ] = ( 0 , ) self . SDL [ "OperatorID" ] = ( - 1 , ) #Re-enable first person camera cam = ptCamera ( ) cam . enableFirstPersonOverride ( ) PtAtTimeCallback ( self . key , 3 , 1 ) # wait for player to finish exit one-shot, then reenable clickable PtDebugPrint ( "ercaOvenScope.IQuitTelescope:\tdelaying clickable reenable" , level = kDebugDumpLevel )