mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 17:17:29 +01:00
make sure there's something appropriate to inject an item into
(fixes #123)
This commit is contained in:
parent
9d6881deca
commit
0c0e6a6b66
@ -196,6 +196,21 @@ local function punch_filter(data, filtpos, filtnode, msg)
|
||||
["technic:tool_workshop"] = "src",
|
||||
}
|
||||
|
||||
local todir = pipeworks.facedir_to_right_dir(filtnode.param2)
|
||||
local topos = vector.add(filtpos, todir)
|
||||
local tonode = minetest.get_node(topos)
|
||||
local todef = minetest.registered_nodes[tonode.name]
|
||||
|
||||
print("===================")
|
||||
print(tonode.name)
|
||||
print(minetest.get_item_group(tonode.name, "tube"))
|
||||
print(minetest.get_item_group(tonode.name, "tubedevice_receiver"))
|
||||
if not todef
|
||||
or not (minetest.get_item_group(tonode.name, "tube") == 1
|
||||
or minetest.get_item_group(tonode.name, "tubedevice_receiver") == 1) then
|
||||
return
|
||||
end
|
||||
|
||||
if fromtube then fromtube.input_inventory = input_special_cases[fromnode.name] or fromtube.input_inventory end
|
||||
if not (fromtube and fromtube.input_inventory) then return end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user