Work Table : prevent cutting to different micronodes when the outputstack is already filled
This commit is contained in:
parent
b887a4bd0c
commit
428ecec29b
@ -50,7 +50,6 @@ xdecor.register("mailbox", {
|
||||
if listname == "drop" then
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
if inv:room_for_item("main", stack) then return -1
|
||||
else return 0 end
|
||||
end
|
||||
|
@ -70,13 +70,16 @@ function worktable.fields(pos, formname, fields, sender)
|
||||
for _, d in pairs(def) do
|
||||
local nb, anz = d[1], d[2]
|
||||
if outputcount < 99 and fields[nb] then
|
||||
local outputshape = string.match(outputstack:get_name(), nb)
|
||||
if nb ~= outputshape and outputcount > 0 then return end
|
||||
shape = "xdecor:"..nb.."_"..string.sub(inputname, 9)
|
||||
get = shape.." "..anz
|
||||
|
||||
if not minetest.registered_nodes[shape] then return end
|
||||
inv:add_item("output", get)
|
||||
inputstack:take_item()
|
||||
inv:set_stack("input", 1, inputstack)
|
||||
if minetest.registered_nodes[shape] then
|
||||
inv:add_item("output", get)
|
||||
inputstack:take_item()
|
||||
inv:set_stack("input", 1, inputstack)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user