ingame/crafting/keyboard/alchemy_keyboard.lua:48 -- ALCHEMY_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
KEYBIND_STRIP:AddKeybindButtonGroup(self.keybindStripDescriptor)
TriggerTutorial(TUTORIAL_TRIGGER_ALCHEMY_OPENED)
self.inventory:SetActiveFilterByDescriptor(nil)
self.inventory:UpdateMode()
-- Reselect so we re-add the temporary fragment for the recipe mode
-- and setup/update the tooltip and corresponding sounds correctly
local oldMode = self.mode
self.mode = nil
ZO_MenuBar_ClearSelection(self.modeBar)
if not oldMode then
ZO_MenuBar_SelectDescriptor(self.modeBar, ZO_ALCHEMY_MODE_CREATION)
else
ZO_MenuBar_SelectDescriptor(self.modeBar, oldMode)
end
if CRAFT_ADVISOR_MANAGER:HasActiveWrits() then
SCENE_MANAGER:AddFragmentGroup(WRIT_ADVISOR_KEYBOARD_FRAGMENT_GROUP)
end
elseif newState == SCENE_HIDDEN then
ZO_InventorySlot_RemoveMouseOverKeybinds()
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.keybindStripDescriptor)
self.inventory:HandleDirtyEvent()
CRAFTING_RESULTS:SetCraftingTooltip(nil)
SCENE_MANAGER:RemoveFragmentGroup(WRIT_ADVISOR_KEYBOARD_FRAGMENT_GROUP)
end
end)