summaryrefslogtreecommitdiff
path: root/jeija
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2012-01-09 15:34:51 +0100
committersfan5 <sfan5@live.de>2012-01-09 15:34:51 +0100
commit2dba4d917fef7c043a92d3076a094534b9dcbc08 (patch)
treeb74b1269b30bbe9ce87b1df76d407e005ea80b51 /jeija
parent618a933ba1e47254166c7cc524d54652209a2965 (diff)
downloadmesecons-2dba4d917fef7c043a92d3076a094534b9dcbc08.tar
mesecons-2dba4d917fef7c043a92d3076a094534b9dcbc08.tar.gz
mesecons-2dba4d917fef7c043a92d3076a094534b9dcbc08.tar.bz2
mesecons-2dba4d917fef7c043a92d3076a094534b9dcbc08.tar.xz
mesecons-2dba4d917fef7c043a92d3076a094534b9dcbc08.zip
Fixed Button-Param2-Check
Diffstat (limited to 'jeija')
-rw-r--r--jeija/button.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/jeija/button.lua b/jeija/button.lua
index 8288cea..b39cc04 100644
--- a/jeija/button.lua
+++ b/jeija/button.lua
@@ -33,9 +33,11 @@ minetest.register_on_dignode(
end
)
minetest.register_on_placenode(function(pos, node)
- if node.param2 == 4 or node.param2 == 8 then
- minetest.env:remove_node(pos)
- minetest.env:add_item(pos, 'node jeija:wall_button_off 1')
+ if node.name == "jeija:wall_button_off" or node.name == "jeija:wall_button_on" then
+ if node.param2 == 4 or node.param2 == 8 then
+ minetest.env:remove_node(pos)
+ minetest.env:add_item(pos, 'node jeija:wall_button_off 1')
+ end
end
end)
minetest.register_on_punchnode(function(pos, node, puncher)