summaryrefslogtreecommitdiff
path: root/mesecons_compatibility
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2013-02-11 08:03:08 +0100
committerJeija <norrepli@gmail.com>2013-02-11 08:03:08 +0100
commit10ea3c971b21cd2232a542d330280007fa743fc4 (patch)
tree4f2a87666ee41be3dee68c001e47682ba6f5287e /mesecons_compatibility
parent591e2d7cde9eda88ca85b71066dd9ed7f75f9a12 (diff)
parent7cc803b0d7ed3ff4f1b57d78b9523919a9fcd924 (diff)
downloadmesecons-10ea3c971b21cd2232a542d330280007fa743fc4.tar
mesecons-10ea3c971b21cd2232a542d330280007fa743fc4.tar.gz
mesecons-10ea3c971b21cd2232a542d330280007fa743fc4.tar.bz2
mesecons-10ea3c971b21cd2232a542d330280007fa743fc4.tar.xz
mesecons-10ea3c971b21cd2232a542d330280007fa743fc4.zip
Merge branch 'master' into luacontroller
Diffstat (limited to 'mesecons_compatibility')
-rw-r--r--mesecons_compatibility/depends.txt1
-rw-r--r--mesecons_compatibility/init.lua14
2 files changed, 8 insertions, 7 deletions
diff --git a/mesecons_compatibility/depends.txt b/mesecons_compatibility/depends.txt
index acaa924..ed2fcd8 100644
--- a/mesecons_compatibility/depends.txt
+++ b/mesecons_compatibility/depends.txt
@@ -1 +1,2 @@
mesecons
+doors
diff --git a/mesecons_compatibility/init.lua b/mesecons_compatibility/init.lua
index b2f793c..451037e 100644
--- a/mesecons_compatibility/init.lua
+++ b/mesecons_compatibility/init.lua
@@ -43,7 +43,7 @@ function doors:register_door(name, def)
end
end
- local function on_punch(pos, dir, check_name, replace, replace_dir, params)
+ local function on_rightclick(pos, dir, check_name, replace, replace_dir, params)
pos.y = pos.y+dir
if not minetest.env:get_node(pos).name == check_name then
return
@@ -62,11 +62,11 @@ function doors:register_door(name, def)
end
local function on_mesecons_signal_open (pos, node)
- on_punch(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
+ on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
end
local function on_mesecons_signal_close (pos, node)
- on_punch(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
+ on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
end
local function check_player_priv(pos, player)
@@ -99,9 +99,9 @@ function doors:register_door(name, def)
after_dig_node(pos, name.."_t_1")
end,
- on_punch = function(pos, node, puncher)
+ on_rightclick = function(pos, node, puncher)
if check_player_priv(pos, puncher) then
- on_punch(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
+ on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
end
end,
@@ -133,9 +133,9 @@ function doors:register_door(name, def)
after_dig_node(pos, name.."_t_2")
end,
- on_punch = function(pos, node, puncher)
+ on_rightclick = function(pos, node, puncher)
if check_player_priv(pos, puncher) then
- on_punch(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
+ on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
end
end,