Fix the use of the deprecated mesecon.addPosRule API function in the switchtorch

This commit is contained in:
paly2 2016-07-27 11:45:15 +02:00
parent 9ffc4147aa
commit 03ae5c0ac0
1 changed files with 2 additions and 1 deletions

View File

@ -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