mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2025-01-09 01:10:22 +01: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)
|
||||
local is_powered = false
|
||||
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
|
||||
break
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user