Skip to content

Commit

Permalink
Prevent item from crafting when inventory is full
Browse files Browse the repository at this point in the history
  • Loading branch information
asl97 committed Jun 29, 2015
1 parent c4c875f commit e79edda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/workbench/init.lua
Expand Up @@ -69,7 +69,7 @@ minetest.register_node("workbench:3x3", {
crafted, left_over = minetest.get_craft_result({method = "normal", width = 3, items = tablelist})
end

if crafted then
if not crafted.item:is_empty() then
if crafted.item:get_definition().skill ~= nil then

-- adjust the quality of the craft item
Expand All @@ -82,7 +82,7 @@ minetest.register_node("workbench:3x3", {
crafted.item:add_wear(wear)
--end
end
if inv:room_for_item("dst", crafted) then
if inv:room_for_item("dst", crafted.item) then
-- clear the crafting table first
if left_over then
inv:set_list("table", left_over.items)
Expand Down

0 comments on commit e79edda

Please sign in to comment.