From f46bc329de7bfc35f64a17822247372e6fa3a1cb Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 30 Nov 2013 20:20:01 -0500 Subject: Use minetest.swap_node() instead of mesecons' version, Minor code changes here and there to facilitate this. --- 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 ec04f0a..1b7f478 100644 --- a/mesecons_switch/init.lua +++ b/mesecons_switch/init.lua @@ -10,7 +10,7 @@ minetest.register_node("mesecons_switch:mesecon_switch_off", { state = mesecon.state.off }}, on_punch = function(pos, node) - mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_on") + minetest.swap_node(pos, {name = "mesecons_switch:mesecon_switch_on", param2 = node.param2}) mesecon:receptor_on(pos) minetest.sound_play("mesecons_switch", {pos=pos}) end @@ -26,7 +26,7 @@ minetest.register_node("mesecons_switch:mesecon_switch_on", { state = mesecon.state.on }}, on_punch = function(pos, node) - mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_off") + minetest.swap_node(pos, {name = "mesecons_switch:mesecon_switch_off", param2 = node.param2}) mesecon:receptor_off(pos) minetest.sound_play("mesecons_switch", {pos=pos}) end -- cgit v1.2.3