check for negative quantities in crafting functions

This commit is contained in:
Van
2026-11-11 20:31:41 +03:00
parent ba8dad4798
commit af0b7c8beb
4 changed files with 23 additions and 4 deletions

View File

@@ -646,7 +646,7 @@ PlayerInventoryUI:registerOnFormFieldActionMatch('%S+::%S+::craft_item', functio
end
Smc.putOrDrop(player, inventory, craft.output)
elseif tabName == 'node_tab' and allowCrafting and handler.baseType == 'immersive' then
elseif allowCrafting and tabName == 'node_tab' and handler.baseType == 'immersive' then
---@type CraftSystem.ImmersiveCraft
craft = craft
local inventory = player:get_inventory()