is_connected_to(target, origin?) | → boolean | Checks if this connector has any wire going to the other connector. |
Checks if this connector has any wire going to the other connector. | ||
connect_to(target, reach_check?, origin?) | → boolean | Connects this connector to other wire connector. |
Connects this connector to other wire connector. | ||
disconnect_from(target, origin?) | → boolean | Disconnects this connector from other wire connector. |
Disconnects this connector from other wire connector. | ||
disconnect_all(origin?) | → boolean | Removes all wires going out of this wire connector. |
Removes all wires going out of this wire connector. | ||
can_wire_reach(other_connector) | → boolean | Checks if a wire can reach from this connector to the other connector. |
Checks if a wire can reach from this connector to the other connector. | ||
have_common_neighbour(other_connector, ignore_ghost_neighbours?) | → boolean | Checks if this and other wire connector have a common neighbour. |
Checks if this and other wire connector have a common neighbour. | ||
owner | :: R LuaEntity | The entity this wire connector belongs to. [...] |
The entity this wire connector belongs to. [...] | ||
wire_type | :: R defines.wire_type | The type of wires that can be connected to this connector. |
The type of wires that can be connected to this connector. | ||
wire_connector_id | :: R defines.wire_connector_id | Identifier of this connector in the entity this connector belongs to. |
Identifier of this connector in the entity this connector belongs to. | ||
is_ghost | :: R boolean | If this connector is owned by an entity inside of a ghost. [...] |
If this connector is owned by an entity inside of a ghost. [...] | ||
connection_count | :: R uint | Amount of wires going out of this connector. [...] |
Amount of wires going out of this connector. [...] | ||
connections | :: R array[WireConnection] | All wire connectors this connector is connected to. |
All wire connectors this connector is connected to. | ||
real_connection_count | :: R uint | Amount of real wires going out of this connector. [...] |
Amount of real wires going out of this connector. [...] | ||
real_connections | :: R array[WireConnection] | All wire connectors this connector is connected to with real wires. |
All wire connectors this connector is connected to with real wires. | ||
network_id | :: R uint | Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. [...] |
Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. [...] | ||
valid | :: R boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
object_name | :: R string | The class name of this object. [...] |
The class name of this object. [...] |
target | :: LuaWireConnector | Other connector to check for a connection to. |
Other connector to check for a connection to. | ||
origin | :: defines.wire_origin? | Origin of the wire. Defaults to |
Origin of the wire. Defaults to |
target | :: LuaWireConnector | Other connector to which a wire should be added. |
Other connector to which a wire should be added. | ||
reach_check | :: boolean? | True by default. For wires out of reach or on different surfaces, |
True by default. For wires out of reach or on different surfaces, | ||
origin | :: defines.wire_origin? | Origin of the wire. Defaults to |
Origin of the wire. Defaults to |
→ boolean | Whether a connection was made. |
target | :: LuaWireConnector | Other connector to which wire to be removed should be removed. |
Other connector to which wire to be removed should be removed. | ||
origin | :: defines.wire_origin? | Origin of the wire. Defaults to |
Origin of the wire. Defaults to |
→ boolean | Whether a connection was removed. |
origin | :: defines.wire_origin? | Origin of the wires to remove. Defaults to |
Origin of the wires to remove. Defaults to |
→ boolean | True if any wire was removed. |
other_connector | :: LuaWireConnector or LuaEntity | Target to which a wire reach is to be checked. |
Target to which a wire reach is to be checked. |
other_connector | :: LuaWireConnector | Other connector to check for common neighbour. |
Other connector to check for common neighbour. | ||
ignore_ghost_neighbours | :: boolean? |