diff options
Diffstat (limited to 'pipeworks')
-rw-r--r-- | pipeworks/filter-injector.lua | 13 | ||||
-rw-r--r-- | pipeworks/teleport_tube.lua | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/pipeworks/filter-injector.lua b/pipeworks/filter-injector.lua index 0d22675..4870501 100644 --- a/pipeworks/filter-injector.lua +++ b/pipeworks/filter-injector.lua @@ -196,6 +196,19 @@ local function punch_filter(data, filtpos, filtnode, msg) ["technic:tool_workshop"] = "src", } + -- make sure there's something appropriate to inject the item into + 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] + + if not todef + or not (minetest.get_item_group(tonode.name, "tube") == 1 + or minetest.get_item_group(tonode.name, "tubedevice") == 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 diff --git a/pipeworks/teleport_tube.lua b/pipeworks/teleport_tube.lua index 3a870f5..bb364db 100644 --- a/pipeworks/teleport_tube.lua +++ b/pipeworks/teleport_tube.lua @@ -111,7 +111,7 @@ local function update_meta(meta, can_receive) meta:set_string("formspec","size[8.6,2.2]".. "field[0.6,0.6;7,1;channel;Channel:;${channel}]".. "label[7.3,0;Receive]".. - "image_button[7.3,0.3;1,1;pipeworks_button_" .. cr_state .. ".png;cr" .. (can_receive and 0 or 1) .. ";;;false;pipeworks_button_interm.png]".. + "image_button[7.3,0.3;1,0.6;pipeworks_button_" .. cr_state .. ".png;cr" .. (can_receive and 0 or 1) .. ";;;false;pipeworks_button_interm.png]".. "image[0.3,1.3;1,1;pipeworks_teleport_tube_inv.png]".. "label[1.6,1.2;channels are public by default]" .. "label[1.6,1.5;use <player>:<channel> for fully private channels]" .. |