Use minetest.swap_node() instead of mesecons' version, Minor code changes

here and there to facilitate this.
This commit is contained in:
Vanessa Ezekowitz
2013-11-30 20:20:01 -05:00
parent 669e3d0880
commit f46bc329de
15 changed files with 40 additions and 44 deletions

View File

@ -88,7 +88,7 @@ minetest.register_abm(
chance = 1,
action = function(pos)
if object_detector_scan(pos) then
mesecon:swap_node(pos, "mesecons_detector:object_detector_on")
minetest.swap_node(pos, {name = "mesecons_detector:object_detector_on"})
mesecon:receptor_on(pos)
end
end,
@ -100,7 +100,7 @@ minetest.register_abm(
chance = 1,
action = function(pos)
if not object_detector_scan(pos) then
mesecon:swap_node(pos, "mesecons_detector:object_detector_off")
minetest.swap_node(pos, {name = "mesecons_detector:object_detector_off"})
mesecon:receptor_off(pos)
end
end,