mirror of
https://github.com/theFox6/microexpansion.git
synced 2024-11-26 09:03:51 +01:00
Allow autocrafting to consume all, now that crafting terminals support listing crafts.
This commit is contained in:
parent
38917de3ff
commit
747242b84a
@ -259,10 +259,8 @@ local function build(net, cpos, inv, name, count, stack, sink, time)
|
|||||||
replace = false
|
replace = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
-- Don't consume the last item by autocrafting
|
|
||||||
istack:set_count(count+1)
|
|
||||||
local hasit = inv:contains_item("main", istack)
|
|
||||||
istack:set_count(count)
|
istack:set_count(count)
|
||||||
|
local hasit = inv:contains_item("main", istack)
|
||||||
me.log("ac checking "..name, "error")
|
me.log("ac checking "..name, "error")
|
||||||
if hasit then
|
if hasit then
|
||||||
me.log("ac grabbing "..name, "error")
|
me.log("ac grabbing "..name, "error")
|
||||||
@ -565,8 +563,7 @@ function me.autocraft(autocrafterCache, cpos, net, linv, inv, count)
|
|||||||
replace = false
|
replace = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
-- Don't consume the last item by autocrafting
|
stack:set_count(count)
|
||||||
stack:set_count(count+1)
|
|
||||||
replace = replace and inv:contains_item("main", stack)
|
replace = replace and inv:contains_item("main", stack)
|
||||||
end
|
end
|
||||||
if replace then
|
if replace then
|
||||||
|
Loading…
Reference in New Issue
Block a user