Code: Select all
local network = entity.get_circuit_network( defines.wire_type.copper );--, defines.circuit_connector_id.electric_pole );
There's no events on connect/disconnect of wires to poles. so I'd have to scan all electrical entitites (everything) all the time to see if they are still part of the same network.