Code: Select all
local input_wire_connectors = input.get_wire_connectors(true)
local lampctrl_wire_connectors = lampctrl.get_wire_connectors()
input_wire_connectors[defines.wire_connector_id.circuit_green].connect_to(lampctrl_wire_connectors[defines.wire_connector_id.circuit_green], false, defines.wire_type.green)
Alternatively, this used to be done with connect_neighbour, if you know another way to do this now that would also be great.
Code: Select all
input.connect_neighbour({target_entity=lampctrl, wire=defines.wire_type.green})