Skip to content

Commit

Permalink
Search Engine: Signal search for NOT 0 instead of > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Oct 14, 2020
1 parent 7f33a0b commit e0c2928
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local function check_networks(entity, signal_id, connection, results)
red = entity.get_circuit_network(defines.wire_type.red)
green = entity.get_circuit_network(defines.wire_type.green)
end
if red and red.get_signal(signal_id) > 0 and not results[red.network_id] then
if red and red.get_signal(signal_id) ~= 0 and not results[red.network_id] then
results[red.network_id] = {
entity = entity,
wire_type = "red",
Expand All @@ -22,7 +22,7 @@ local function check_networks(entity, signal_id, connection, results)
count = red.get_signal(signal_id)
}
end
if green and green.get_signal(signal_id) > 0 and not results[green.network_id] then
if green and green.get_signal(signal_id) ~= 0 and not results[green.network_id] then
results[green.network_id] = {
entity = entity,
wire_type = "green",
Expand Down

0 comments on commit e0c2928

Please sign in to comment.