Replace mesecon:<some_function> with mesecon.<some_function> for greater

flexibility and because it was never inteded to be OOP in the first
place.

mesecon.receptor_on and mesecon.receptor_off are provided by wrappers
(mesecon:receptor_on/off) for compatibility, but will be removed. Mod
programmers that use mesecons: Please update!

Also, fix microcontroller polluting the global namespace and remove some
deprecated stuff.
此提交包含在:
Jeija
2014-11-22 15:42:22 +01:00
父節點 ffacbfde5a
當前提交 5be179bf11
共有 31 個檔案被更改,包括 455 行新增488 行删除

查看文件

@@ -11,7 +11,7 @@ minetest.register_node("mesecons_switch:mesecon_switch_off", {
}},
on_punch = function(pos, node)
minetest.swap_node(pos, {name = "mesecons_switch:mesecon_switch_on", param2 = node.param2})
mesecon:receptor_on(pos)
mesecon.receptor_on(pos)
minetest.sound_play("mesecons_switch", {pos=pos})
end
})
@@ -27,7 +27,7 @@ minetest.register_node("mesecons_switch:mesecon_switch_on", {
}},
on_punch = function(pos, node)
minetest.swap_node(pos, {name = "mesecons_switch:mesecon_switch_off", param2 = node.param2})
mesecon:receptor_off(pos)
mesecon.receptor_off(pos)
minetest.sound_play("mesecons_switch", {pos=pos})
end
})