Cleanup, make and use util.lua, port command block and delayer to nodedef

This commit is contained in:
Jeija
2012-12-08 21:56:09 +01:00
parent 8578fd89c8
commit 00e071b695
10 changed files with 364 additions and 351 deletions

View File

@ -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
})