ingame/crafting/keyboard/provisioner.lua:63 -- PROVISIONER_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_FRAGMENT_SHOWING then
SYSTEMS:GetObject("craftingResults"):SetCraftingTooltip(self.resultTooltip)
KEYBIND_STRIP:AddKeybindButtonGroup(self.mainKeybindStripDescriptor)
elseif newState == SCENE_FRAGMENT_HIDDEN then
SYSTEMS:GetObject("craftingResults"):SetCraftingTooltip(nil)
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.mainKeybindStripDescriptor)
-- when we hide this fragment make sure to end the preview and toggle the camera back to normal,
-- since we may still be staying in the crafting scene
if ITEM_PREVIEW_KEYBOARD:IsInteractionCameraPreviewEnabled() then
self:TogglePreviewMode()
end
end
end)