This commit is contained in:
Henry Behrendt 2021-09-13 21:08:22 +02:00
parent 6bc69577d4
commit 127fabfb67
1 changed files with 5 additions and 2 deletions

View File

@ -221,8 +221,11 @@ local function comparator_desired_on(pos, node)
local side_voltage = 0
for ri = 2,3 do
if my_input_rules[ri] then
local _, s_voltage = mesecon.is_power_on(vector.add(pos, my_input_rules[ri]))
side_voltage = math.max(side_voltage, s_voltage)
for _, l in pairs(mesecon.rules_link_rule_all_inverted(pos, my_input_rules[ri])) do
local _, s_voltage = mesecon.is_power_on(vector.add(pos, my_input_rules[ri]))
side_voltage = math.max(side_voltage, s_voltage)
end
end
end
if mode == "comp" then