1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-11-17 15:58:29 +01:00

Autocrafter only crafts when destination inventory has space

This commit is contained in:
bas080 2013-04-07 11:30:11 +02:00
parent e271dc0818
commit 7b561ab423

View File

@ -11,6 +11,7 @@ function autocraft(inventory)
local input=inventory:get_list("input")
if result.item:is_empty() then return end
result=result.item
if not inventory:room_for_item("dst", result) then return end
local to_use={}
for _,item in ipairs(recipe) do
if item~=nil and not item:is_empty() then
@ -77,4 +78,4 @@ minetest.register_abm({nodenames={"pipeworks:autocrafter"},interval=1,chance=1,
local meta=minetest.env:get_meta(pos)
local inv=meta:get_inventory()
autocraft(inv)
end})
end})