From 2dba4d917fef7c043a92d3076a094534b9dcbc08 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 9 Jan 2012 15:34:51 +0100 Subject: Fixed Button-Param2-Check --- jeija/button.lua | 8 +++++--- 1 file 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) -- cgit v1.2.3