internalingame/antiquitydigging/antiquitydigging.lua:86 -- ANTIQUITY_DIGGING_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_FRAGMENT_SHOWING then
self.isReadyToPlay = false
control:RegisterForEvent(EVENT_ANTIQUITY_DIGGING_READY_TO_PLAY, function() self:OnAntiquityDiggingReadyToPlay() end)
self:RefreshActiveToolKeybinds()
elseif newState == SCENE_FRAGMENT_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.triggeredTutorial = false
self:RefreshInputState()
ZO_Dialogs_ReleaseAllDialogsOfName("CONFIRM_STOP_ANTIQUITY_DIGGING")
elseif newState == SCENE_FRAGMENT_HIDDEN then
self.keybindContainerTimeline:PlayInstantlyToStart()
if self.beginEndOfGameFanfareEventId then
EVENT_MANAGER:UnregisterForUpdate(self.beginEndOfGameFanfareEventId)
self.beginEndOfGameFanfareEventId = nil
end
end
end)