Connector Module
The connector module allows the user to control connectors on the grid.
Commands
lock
Lock a connector or group of connectors.
connector/lock <Connector|Group>
Example
connector/lock DockingConnector
unlock
Unlock a connector or group of connectors.
connector/unlock <Connector|Group>
Example
connector/unlock DockingConnector
toggle
Toggle the lock state of a connector or group of connectors.
connector/toggle <Connector|Group>
Example
connector/toggle DockingConnector
Hooks
The following hooks can be define in the block's Custom Data, and will be triggered when the corresponding command is called:
Key | Trigger |
---|---|
onLock | Run when a connector locks. |
onUnlock | Run when a connector unlocks. |
onReady | Run when a connector is ready to lock. |
Example
Imagine our connector has a status light we want to view elsewhere:
[hooks]
onLock=light/color "Dock Light" red;
onUnlock=light/color "Dock Light" green;
or
[hooks]
DockConnector.onUnlock=light/color "Dock Light" green;
"Fuel Connector".onLock=tank/stockpile FuelTanks;
Configuration
Key | Value | Description |
---|---|---|
appDistance | meters | The distance the approaching grid should approach from. Default is 30m. |
Example
[general]
; Set the approach distance to 50 meters from the connector face
appDistance=50