Implement mesecon:register_receptor(onstate, offstate, rules, get_rules) and make add_receptor_node(_off) deprecated

This commit is contained in:
Jeija
2012-09-06 09:53:30 +02:00
parent 3c90f36a75
commit 3928d54d0c
4 changed files with 33 additions and 31 deletions

View File

@ -15,8 +15,7 @@ minetest.register_node("mesecons_switch:mesecon_switch_on", {
description="Switch",
})
mesecon:add_receptor_node("mesecons_switch:mesecon_switch_on")
mesecon:add_receptor_node_off("mesecons_switch:mesecon_switch_off")
mesecon:register_receptor("mesecons_switch:mesecon_switch_on", "mesecons_switch:mesecon_switch_off")
minetest.register_on_punchnode(function(pos, node, puncher)
if node.name == "mesecons_switch:mesecon_switch_on" then