summaryrefslogtreecommitdiff
path: root/mesecons_pistons
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-08-13 20:37:39 +0200
committerJeija <norrepli@gmail.com>2012-08-13 20:37:39 +0200
commit6f9036c70b853f679a96c6125aebf8d0987b5445 (patch)
tree99f25f1c4def7d550d2436a045ad91e62448178a /mesecons_pistons
parent00ce2540c22340ed02135d74c6d70a35757e8deb (diff)
downloadmesecons-6f9036c70b853f679a96c6125aebf8d0987b5445.tar
mesecons-6f9036c70b853f679a96c6125aebf8d0987b5445.tar.gz
mesecons-6f9036c70b853f679a96c6125aebf8d0987b5445.tar.bz2
mesecons-6f9036c70b853f679a96c6125aebf8d0987b5445.tar.xz
mesecons-6f9036c70b853f679a96c6125aebf8d0987b5445.zip
Register piston_up and piston_down as effectors
Diffstat (limited to 'mesecons_pistons')
-rw-r--r--mesecons_pistons/pistons_down.lua8
-rw-r--r--mesecons_pistons/pistons_up.lua4
2 files changed, 10 insertions, 2 deletions
diff --git a/mesecons_pistons/pistons_down.lua b/mesecons_pistons/pistons_down.lua
index 82bb3f4..4d39c7f 100644
--- a/mesecons_pistons/pistons_down.lua
+++ b/mesecons_pistons/pistons_down.lua
@@ -3,7 +3,7 @@
minetest.register_node("mesecons_pistons:piston_down_normal", {
description = "Piston DOWN",
tiles = {"jeija_piston_tb.png", "jeija_piston_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"},
- groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
+ groups = {cracky=3, mesecon = 2},
after_dig_node = function(pos, oldnode)
local dir = {x=0, y=-1, z=0}
pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check
@@ -18,11 +18,13 @@ minetest.register_node("mesecons_pistons:piston_down_normal", {
end,
})
+mesecon:register_effector("mesecons_pistons:piston_down_normal", "mesecons_pistons:piston_down_normal")
+
--registration sticky one:
minetest.register_node("mesecons_pistons:piston_down_sticky", {
description = "Sticky Piston DOWN",
tiles = {"jeija_piston_tb.png", "jeija_piston_sticky_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"},
- groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
+ groups = {cracky=3, mesecon = 2},
after_dig_node = function(pos, oldnode)
local dir = {x=0, y=-1, z=0}
pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check
@@ -37,6 +39,8 @@ minetest.register_node("mesecons_pistons:piston_down_sticky", {
end,
})
+mesecon:register_effector("mesecons_pistons:piston_down_sticky", "mesecons_pistons:piston_down_sticky")
+
minetest.register_craft({
output = "mesecons_pistons:piston_down_normal",
recipe = {
diff --git a/mesecons_pistons/pistons_up.lua b/mesecons_pistons/pistons_up.lua
index 1d116ca..01675e0 100644
--- a/mesecons_pistons/pistons_up.lua
+++ b/mesecons_pistons/pistons_up.lua
@@ -18,6 +18,8 @@ minetest.register_node("mesecons_pistons:piston_up_normal", {
end,
})
+mesecon:register_effector("mesecons_pistons:piston_up_normal", "mesecons_pistons:piston_up_normal")
+
--registration sticky one:
minetest.register_node("mesecons_pistons:piston_up_sticky", {
description = "Sticky Piston UP",
@@ -37,6 +39,8 @@ minetest.register_node("mesecons_pistons:piston_up_sticky", {
end,
})
+mesecon:register_effector("mesecons_pistons:piston_up_sticky", "mesecons_pistons:piston_up_sticky")
+
minetest.register_craft({
output = "mesecons_pistons:piston_up_normal",
recipe = {