Prevent item from crafting when inventory is full

pull/6/head
asl97 2015-06-29 12:51:07 +08:00 committed by ASL97
parent c4c875f9fe
commit e79edda1fa
1 changed files with 2 additions and 2 deletions

View File

@ -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
@ -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)