Fix on-state effector-receptor combos (eg. gates) recepting to everywhere

This commit is contained in:
Desour 2021-03-25 18:54:21 +01:00 committed by sfan5
parent 3f75c06a3b
commit 69d4a9584d

@ -449,9 +449,11 @@ function mesecon.turnoff(pos, link)
-- Check if an onstate receptor is connected. If that is the case,
-- abort this turnoff process by returning false. `receptor_off` will
-- discard all the changes that we made in the voxelmanip:
if mesecon.rules_link_rule_all_inverted(f.pos, r)[1] then
if mesecon.is_receptor_on(mesecon.get_node_force(np).name) then
return false
end
end
-- Call turnoff on neighbors
for _, l in ipairs(mesecon.rules_link_rule_all(f.pos, r)) do