internalingame/scrying/scrying.lua:1329 -- SCRYING_SCENE:RegisterCallback("StateChange", function(oldState, newState)
local NO_SOUND = true
local ANIMATE_INSTANTLY = true
if newState == SCENE_SHOWING then
self.isScryingReady = false
self.startedOutro = false
self.startedEndOfGame = false
self:TrySetCurrentSkill(SCRYING_ACTIVE_SKILL_NORMAL, NO_SOUND)
self.board:OnShowing()
self.normalActionMeter:OnShowing()
self:RefreshNormalActionMeter(ANIMATE_INSTANTLY)
self:RefreshSpecialActionMeter(ANIMATE_INSTANTLY)
self:RefreshActionButtons()
self:RefreshEyeAnimations()
self:RefreshMoreInfoButton()
self:RefreshInputState()
SetOverrideMusicMode(OVERRIDE_MUSIC_MODE_SCRYING)
PlaySound(SOUNDS.SCRYING_START_INTRO)
elseif newState == SCENE_HIDING then
--clear the current tutorial when hiding so we don't push an extra action layer
self.triggeredTutorial = false
self:RefreshInputState()
ZO_Dialogs_ReleaseAllDialogsOfName("CONFIRM_EXIT_SCRYING")
if self.completedEndOfGameCallLaterId then
zo_removeCallLater(self.completedEndOfGameCallLaterId)
end
elseif newState == SCENE_HIDDEN then
self.board:OnHidden()
-- We may have already left music mode as a result of the outro,
-- in which case this is harmless, but otherwise we still need to
-- leave music mode
SetOverrideMusicMode(OVERRIDE_MUSIC_MODE_NONE)
end
end)