Commit b694a790 authored by Fedja Beader's avatar Fedja Beader
Browse files

invnet: Try to figure out input list for unknown nodes

parent be435f08
......@@ -231,15 +231,23 @@ core.register_on_punchnode(function(pos, node)
l:info("Unknown node punched: " .. .. " adding it as source chest")
local inv = core.get_inventory(pos)
local m = {}
if inv["src"] then
m.input_list_name = "src"
elseif inv["main"] then
m.input_list_name = "main"
if inv["dst"] then
m.output_list_name = "dst"
elseif inv["main"] then
m.output_list_name = "main"
if m.output_list_name then
if m.input_list_name and m.output_list_name then
m.pos = pos
invnet.machines[machine_index] = m
l:err(" no inventory lists? Skipped adding.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment