internalingame/antiquitydigging/antiquitydigging.lua:95 -- ANTIQUITY_DIGGING_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
self.isReadyToPlay = false
self.selectedRow = nil
self.selectedColumn = nil
control:RegisterForEvent(EVENT_ANTIQUITY_DIGGING_READY_TO_PLAY, function() self:OnAntiquityDiggingReadyToPlay() end)
self:RefreshActiveToolKeybinds()
elseif newState == SCENE_HIDING then
control:UnregisterForEvent(EVENT_ANTIQUITY_DIGGING_READY_TO_PLAY)
control:SetHandler("OnUpdate", nil)
--clear the current tutorial when hiding so we don't push an extra action layer
self:RefreshInputState()
ZO_Dialogs_ReleaseAllDialogsOfName("CONFIRM_STOP_ANTIQUITY_DIGGING")
elseif newState == SCENE_HIDDEN then
self.keybindContainerTimeline:PlayInstantlyToStart()
if self.beginEndOfGameFanfareEventId then
EVENT_MANAGER:UnregisterForUpdate(self.beginEndOfGameFanfareEventId)
self.beginEndOfGameFanfareEventId = nil
end
end
end)