summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2018-11-29 19:09:44 -0600
committercheapie <no-email-for-you@example.com>2018-11-29 19:09:44 -0600
commit0ffc118f4c1d548ef9565f17ad49960e5ddb93bc (patch)
treee76baea07e92048fbabb5ed4cc469892ef65dcb1
parentbd4684e000617ef769d5adccf8799ddd935bf7e0 (diff)
downloaddigistuff-0ffc118f4c1d548ef9565f17ad49960e5ddb93bc.tar
digistuff-0ffc118f4c1d548ef9565f17ad49960e5ddb93bc.tar.gz
digistuff-0ffc118f4c1d548ef9565f17ad49960e5ddb93bc.tar.bz2
digistuff-0ffc118f4c1d548ef9565f17ad49960e5ddb93bc.tar.xz
digistuff-0ffc118f4c1d548ef9565f17ad49960e5ddb93bc.zip
Allow pistons to conduct digilines signals
-rw-r--r--piston.lua40
1 files changed, 36 insertions, 4 deletions
diff --git a/piston.lua b/piston.lua
index cb3fc6b..b4ed655 100644
--- a/piston.lua
+++ b/piston.lua
@@ -66,8 +66,17 @@ minetest.register_node("digistuff:piston", {
local meta = minetest.get_meta(pos)
if fields.channel then meta:set_string("channel",fields.channel) end
end,
- digiline =
- {
+ digiline = {
+ wire = {
+ rules = {
+ {x = 1, y = 0, z = 0},
+ {x =-1, y = 0, z = 0},
+ {x = 0, y = 1, z = 0},
+ {x = 0, y =-1, z = 0},
+ {x = 0, y = 0, z = 1},
+ {x = 0, y = 0, z =-1},
+ },
+ },
receptor = {},
effector = {
action = function(pos,node,channel,msg)
@@ -132,8 +141,17 @@ minetest.register_node("digistuff:piston_ext", {
minetest.remove_node(ppos)
end
end,
- digiline =
- {
+ digiline = {
+ wire = {
+ rules = {
+ {x = 1, y = 0, z = 0},
+ {x =-1, y = 0, z = 0},
+ {x = 0, y = 1, z = 0},
+ {x = 0, y =-1, z = 0},
+ {x = 0, y = 0, z = 1},
+ {x = 0, y = 0, z =-1},
+ },
+ },
receptor = {},
effector = {
action = function(pos,node,channel,msg)
@@ -161,6 +179,8 @@ minetest.register_node("digistuff:piston_ext", {
minetest.register_node("digistuff:piston_pusher", {
description = "Digilines Piston Pusher (you hacker you!)",
groups = {not_in_creative_inventory=1},
+ paramtype = "light",
+ sunlight_propagates = true,
paramtype2 = "facedir",
tiles = {
"digistuff_piston_sides.png^[transformR180",
@@ -184,6 +204,18 @@ minetest.register_node("digistuff:piston_pusher", {
{0,0,0,0,0,0},
}
},
+ digiline = {
+ wire = {
+ rules = {
+ {x = 1, y = 0, z = 0},
+ {x =-1, y = 0, z = 0},
+ {x = 0, y = 1, z = 0},
+ {x = 0, y =-1, z = 0},
+ {x = 0, y = 0, z = 1},
+ {x = 0, y = 0, z =-1},
+ },
+ },
+ },
})
mesecon.register_mvps_stopper("digistuff:piston_ext")