mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2024-08-21 05:34:06 +02:00
Fix the use of the deprecated mesecon.addPosRule API function in the switchtorch
This commit is contained in:
parent
9ffc4147aa
commit
03ae5c0ac0
@ -94,7 +94,8 @@ minetest.register_abm({
|
|||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
local is_powered = false
|
local is_powered = false
|
||||||
for _, rule in ipairs(torch_get_input_rules(node)) do
|
for _, rule in ipairs(torch_get_input_rules(node)) do
|
||||||
if mesecon.is_power_on(mesecon.addPosRule(pos, rule)) then
|
local src = vector.add(pos, rule)
|
||||||
|
if mesecon.is_power_on(src) then
|
||||||
is_powered = true
|
is_powered = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user