mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-28 05:50:17 +02:00
Remove deprecated API functions "register_on_placenode" and "register_on_dignode" where possible.
This commit is contained in:
@ -13,6 +13,9 @@ minetest.register_node("mesecons_switch:mesecon_switch_on", {
|
||||
groups = {dig_immediate=2},
|
||||
drop='"mesecons_switch:mesecon_switch_off" 1',
|
||||
description="Switch",
|
||||
after_dig_node = function(pos)
|
||||
mesecon:receptor_off(pos)
|
||||
end
|
||||
})
|
||||
|
||||
mesecon:add_receptor_node("mesecons_switch:mesecon_switch_on")
|
||||
@ -31,14 +34,6 @@ minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_dignode(
|
||||
function(pos, oldnode, digger)
|
||||
if oldnode.name == "mesecons_switch:mesecon_switch_on" then
|
||||
mesecon:receptor_off(pos)
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
minetest.register_craft({
|
||||
output = '"mesecons_switch:mesecon_switch_off" 2',
|
||||
recipe = {
|
||||
|
Reference in New Issue
Block a user