forked from mtcontrib/pipeworks
Merge pull request #26 from bas080/master
Autocrafter only crafts when destination inventory has space
This commit is contained in:
commit
16665060d4
@ -11,6 +11,7 @@ function autocraft(inventory)
|
|||||||
local input=inventory:get_list("input")
|
local input=inventory:get_list("input")
|
||||||
if result.item:is_empty() then return end
|
if result.item:is_empty() then return end
|
||||||
result=result.item
|
result=result.item
|
||||||
|
if not inventory:room_for_item("dst", result) then return end
|
||||||
local to_use={}
|
local to_use={}
|
||||||
for _,item in ipairs(recipe) do
|
for _,item in ipairs(recipe) do
|
||||||
if item~=nil and not item:is_empty() then
|
if item~=nil and not item:is_empty() then
|
||||||
|
Loading…
Reference in New Issue
Block a user