From 00e071b695574928fce2ca56e3e8eca6ad3d35ef Mon Sep 17 00:00:00 2001 From: Jeija Date: Sat, 8 Dec 2012 21:56:09 +0100 Subject: Cleanup, make and use util.lua, port command block and delayer to nodedef --- mesecons_switch/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesecons_switch') diff --git a/mesecons_switch/init.lua b/mesecons_switch/init.lua index 2af5101..0519e03 100644 --- a/mesecons_switch/init.lua +++ b/mesecons_switch/init.lua @@ -9,7 +9,7 @@ minetest.register_node("mesecons_switch:mesecon_switch_off", { state = mesecon.state.off }}, on_punch = function(pos, node) - minetest.env:add_node(pos, {name="mesecons_switch:mesecon_switch_on", param2=node.param2}) + mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_on") mesecon:receptor_on(pos) end }) @@ -23,7 +23,7 @@ minetest.register_node("mesecons_switch:mesecon_switch_on", { state = mesecon.state.on }}, on_punch = function(pos, node) - minetest.env:add_node(pos, {name="mesecons_switch:mesecon_switch_off", param2=node.param2}) + mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_off") mesecon:receptor_off(pos) end }) -- cgit v1.2.3