diff options
author | Jeija <norrepli@gmail.com> | 2012-12-08 21:56:09 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-12-08 21:56:09 +0100 |
commit | 00e071b695574928fce2ca56e3e8eca6ad3d35ef (patch) | |
tree | 86904b9a3729898581253989bbaf4d195ea71a53 /mesecons_switch/init.lua | |
parent | 8578fd89c859162bda64af48826b7c1ae1c9e744 (diff) | |
download | mesecons-00e071b695574928fce2ca56e3e8eca6ad3d35ef.tar mesecons-00e071b695574928fce2ca56e3e8eca6ad3d35ef.tar.gz mesecons-00e071b695574928fce2ca56e3e8eca6ad3d35ef.tar.bz2 mesecons-00e071b695574928fce2ca56e3e8eca6ad3d35ef.tar.xz mesecons-00e071b695574928fce2ca56e3e8eca6ad3d35ef.zip |
Cleanup, make and use util.lua, port command block and delayer to nodedef
Diffstat (limited to 'mesecons_switch/init.lua')
-rw-r--r-- | mesecons_switch/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 }) |