mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-07-03 00:30:34 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
7894f35d8b | |||
3c79fa21cb | |||
79dca16d3b | |||
44ea3b4a4f | |||
c8ae6cc66c | |||
09de7c8960 | |||
64c986de18 |
@ -558,9 +558,10 @@ local function put_to_inputinv(pos, node, filtmeta, list)
|
||||
local frompos = vector.subtract(pos, dir)
|
||||
local fromnode = core.get_node(frompos)
|
||||
local fromdef = core.registered_nodes[fromnode.name]
|
||||
if not fromdef or not fromdef.tube then
|
||||
if not (fromdef and fromdef.tube) then
|
||||
return
|
||||
end
|
||||
|
||||
local fromtube = fromdef.tube
|
||||
local frominv
|
||||
if fromtube.return_input_invref then
|
||||
@ -577,6 +578,7 @@ local function put_to_inputinv(pos, node, filtmeta, list)
|
||||
if not listname then
|
||||
return
|
||||
end
|
||||
|
||||
for i = 1, #list do
|
||||
local item = list[i]
|
||||
if not item:is_empty() then
|
||||
@ -596,9 +598,14 @@ core.register_lbm({
|
||||
action = function(pos, node)
|
||||
local meta = core.get_meta(pos)
|
||||
local list = meta:get_inventory():get_list("main")
|
||||
if not list then
|
||||
return
|
||||
end
|
||||
|
||||
if put_to_inputinv(pos, node, meta, list) then
|
||||
return
|
||||
end
|
||||
|
||||
pos.y = pos.y + 1
|
||||
for i = 1, #list do
|
||||
local item = list[i]
|
||||
@ -608,3 +615,4 @@ core.register_lbm({
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user