summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-11-14 07:07:33 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-11-14 07:07:33 +0300
commitc9a951c2e816a8fe65b496b8a9fd1a2edfcd394a (patch)
tree1180f5d8f7b4e097a986878dc882a51c982cc11c
parentf5a60ba407175d07daf69c6955ecb3fcf5b7fa64 (diff)
downloadpipeworks-c9a951c2e816a8fe65b496b8a9fd1a2edfcd394a.tar
pipeworks-c9a951c2e816a8fe65b496b8a9fd1a2edfcd394a.tar.gz
pipeworks-c9a951c2e816a8fe65b496b8a9fd1a2edfcd394a.tar.bz2
pipeworks-c9a951c2e816a8fe65b496b8a9fd1a2edfcd394a.tar.xz
pipeworks-c9a951c2e816a8fe65b496b8a9fd1a2edfcd394a.zip
improving connectivity
-rw-r--r--lua_tube.lua24
-rw-r--r--signal_tubes.lua5
2 files changed, 26 insertions, 3 deletions
diff --git a/lua_tube.lua b/lua_tube.lua
index 8cc4468..941ef92 100644
--- a/lua_tube.lua
+++ b/lua_tube.lua
@@ -37,6 +37,23 @@ local rules = {
white = {x = 0, y = 0, z = 1, name = "white"},
}
+local digiline_rules_luatube = {
+ {x=0, y=0, z=-1},
+ {x=1, y=0, z=0},
+ {x=-1, y=0, z=0},
+ {x=0, y=0, z=1},
+ {x=1, y=1, z=0},
+ {x=1, y=-1, z=0},
+ {x=-1, y=1, z=0},
+ {x=-1, y=-1, z=0},
+ {x=0, y=1, z=1},
+ {x=0, y=-1, z=1},
+ {x=0, y=1, z=-1},
+ {x=0, y=-1, z=-1},
+ -- vertical connectivity
+ {x=0, y=1, z=0},
+ {x=0, y=-1, z=0},
+}
------------------
-- Action stuff --
@@ -303,7 +320,7 @@ local function get_digiline_send(pos)
end
minetest.after(0, function()
- digilines.receptor_send(pos, digiline.rules.default, channel, msg)
+ digilines.receptor_send(pos, digiline_rules_luatube, channel, msg)
end)
return true
end
@@ -540,7 +557,10 @@ local digiline = {
action = function(pos, node, channel, msg)
run(pos, {type = "digiline", channel = channel, msg = msg})
end
- }
+ },
+ wire = {
+ rules = pipeworks.digilines_rules
+ },
}
local function on_receive_fields(pos, form_name, fields, sender)
if not fields.program then
diff --git a/signal_tubes.lua b/signal_tubes.lua
index 7048ebb..1d8daae 100644
--- a/signal_tubes.lua
+++ b/signal_tubes.lua
@@ -102,7 +102,10 @@ if digiline_enabled and pipeworks.enable_digiline_detector_tube then
receptor = {},
effector = {
action = function(pos,node,channel,msg) end
- }
+ },
+ wire = {
+ rules = pipeworks.digilines_rules
+ },
},
},
})