mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-09-27 23:00:29 +02:00
fix error in torch behavior
This commit is contained in:
parent
58238284b8
commit
70498ae93c
|
@ -60,13 +60,17 @@ local torch_update = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if is_powered and node.name == "mesecons_torch:mesecon_torch_on" then
|
if is_powered then
|
||||||
|
if node.name == "mesecons_torch:mesecon_torch_on" then
|
||||||
minetest.swap_node(pos, {name = "mesecons_torch:mesecon_torch_off", param2 = node.param2})
|
minetest.swap_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_off" then
|
end
|
||||||
|
else
|
||||||
|
if node.name == "mesecons_torch:mesecon_torch_off" then
|
||||||
minetest.swap_node(pos, {name = "mesecons_torch:mesecon_torch_on", param2 = node.param2})
|
minetest.swap_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))
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user