forked from MineClone5/MineClone5
Redstone torch: Use set_node instead of swap_node
This commit is contained in:
parent
29d034ad09
commit
94dfd63e14
|
@ -140,17 +140,17 @@ minetest.register_abm({
|
||||||
|
|
||||||
if is_powered then
|
if is_powered then
|
||||||
if node.name == "mesecons_torch:mesecon_torch_on" then
|
if node.name == "mesecons_torch:mesecon_torch_on" then
|
||||||
minetest.swap_node(pos, {name="mesecons_torch:mesecon_torch_off", param2=node.param2})
|
minetest.set_node(pos, {name="mesecons_torch:mesecon_torch_off", param2=node.param2})
|
||||||
mesecon.receptor_off(pos, torch_get_output_rules(node))
|
mesecon.receptor_off(pos, torch_get_output_rules(node))
|
||||||
elseif node.name == "mesecons_torch:mesecon_torch_on_wall" then
|
elseif node.name == "mesecons_torch:mesecon_torch_on_wall" then
|
||||||
minetest.swap_node(pos, {name="mesecons_torch:mesecon_torch_off_wall", param2=node.param2})
|
minetest.set_node(pos, {name="mesecons_torch:mesecon_torch_off_wall", param2=node.param2})
|
||||||
mesecon.receptor_off(pos, torch_get_output_rules(node))
|
mesecon.receptor_off(pos, torch_get_output_rules(node))
|
||||||
end
|
end
|
||||||
elseif node.name == "mesecons_torch:mesecon_torch_off" then
|
elseif node.name == "mesecons_torch:mesecon_torch_off" then
|
||||||
minetest.swap_node(pos, {name="mesecons_torch:mesecon_torch_on", param2=node.param2})
|
minetest.set_node(pos, {name="mesecons_torch:mesecon_torch_on", param2=node.param2})
|
||||||
mesecon.receptor_on(pos, torch_get_output_rules(node))
|
mesecon.receptor_on(pos, torch_get_output_rules(node))
|
||||||
elseif node.name == "mesecons_torch:mesecon_torch_off_wall" then
|
elseif node.name == "mesecons_torch:mesecon_torch_off_wall" then
|
||||||
minetest.swap_node(pos, {name="mesecons_torch:mesecon_torch_on_wall", param2=node.param2})
|
minetest.set_node(pos, {name="mesecons_torch:mesecon_torch_on_wall", param2=node.param2})
|
||||||
mesecon.receptor_on(pos, torch_get_output_rules(node))
|
mesecon.receptor_on(pos, torch_get_output_rules(node))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue