summaryrefslogtreecommitdiff
path: root/pipeworks/routing_tubes.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-05 00:23:23 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-05 00:23:23 -0400
commit4c9e8e6bf06b09b3a015bd7d76ea2a8966e0336f (patch)
treeda4748ec4655a0fc2dc40e777cc8cab88c863caa /pipeworks/routing_tubes.lua
parent8958d6176121ecdf4f6786f4adddf194e7abe9e9 (diff)
downloaddreambuilder_modpack-4c9e8e6bf06b09b3a015bd7d76ea2a8966e0336f.tar
dreambuilder_modpack-4c9e8e6bf06b09b3a015bd7d76ea2a8966e0336f.tar.gz
dreambuilder_modpack-4c9e8e6bf06b09b3a015bd7d76ea2a8966e0336f.tar.bz2
dreambuilder_modpack-4c9e8e6bf06b09b3a015bd7d76ea2a8966e0336f.tar.xz
dreambuilder_modpack-4c9e8e6bf06b09b3a015bd7d76ea2a8966e0336f.zip
update areasprotector mod, pipeworks, technic
Diffstat (limited to 'pipeworks/routing_tubes.lua')
-rw-r--r--pipeworks/routing_tubes.lua25
1 files changed, 24 insertions, 1 deletions
diff --git a/pipeworks/routing_tubes.lua b/pipeworks/routing_tubes.lua
index 0a82fc8..17a3f79 100644
--- a/pipeworks/routing_tubes.lua
+++ b/pipeworks/routing_tubes.lua
@@ -9,6 +9,29 @@ minetest.register_craft( {
},
})
+pipeworks.register_tube("pipeworks:broken_tube", {
+ description = "Broken Tube (you hacker you)",
+ inventory_image = "pipeworks_tube_broken_inv.png",
+ plain = { { name = "pipeworks_tube_broken_plain.png", color = nodecolor, backface_culling = false } },
+ noctr = { { name = "pipeworks_tube_broken_plain.png", color = nodecolor, backface_culling = false } },
+ ends = { { name = "pipeworks_tube_broken_end.png", color = nodecolor } },
+ short = { name = "pipeworks_tube_broken_short.png", color = nodecolor },
+ node_def = {
+ drop = "pipeworks:tube_1",
+ groups = {not_in_creative_inventory = 1, tubedevice_receiver = 1},
+ tube = {
+ insert_object = function(pos, node, stack, direction)
+ minetest.item_drop(stack, nil, pos)
+ return ItemStack("")
+ end,
+ can_insert = function(pos,node,stack,direction)
+ return true
+ end,
+ priority = 50,
+ }
+ }
+})
+
-- the high priority tube is a low-cpu replacement for sorting tubes in situations
-- where players would use them for simple routing (turning off paths)
-- without doing actual sorting, like at outputs of tubedevices that might both accept and eject items
@@ -101,7 +124,7 @@ if pipeworks.enable_one_way_tube then
return {velocity}
end,
can_insert = function(pos, node, stack, direction)
- local dir = minetest.facedir_to_right_dir(node.param2)
+ local dir = pipeworks.facedir_to_right_dir(node.param2)
return vector.equals(dir, direction)
end,
priority = 75 -- Higher than normal tubes, but lower than receivers