edit_connections
Add or remove typed control and electrical wires in a Stormworks draft, applying connect/disconnect operations atomically with revision checks and optional preview or commit.
Instructions
Add or remove typed control and electrical wires in a draft. Uses the query_connections revision. Ops: {op:'connect',from:{part_id,port},to:{part_id,port}} or {op:'disconnect',link_id}. Signal outputs connect to inputs; electricity is bidirectional. One driver per signal input. Pipes and shafts use route_connections; whole starter, clutch, brake or light set-ups use apply_vehicle_assembly. Original XML and settings stay lossless. Returns the wires added and removed, warnings and the new revision; preview=true adds the image and full notes. commit=true keeps one undo step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commit | No | false (default) previews without changing the draft; true applies it as one undo step. | |
| design | Yes | Stored draft name (from import_vehicle, create_land_vehicle, store_design or save_hull; see list_designs). | |
| preview | No | true also returns the rendered preview image and the full build notes; false (default) returns a compact list of what changed, warnings and the new revision. | |
| revision | Yes | The draft's current revision from query_parts or query_connections; a stale one is rejected. | |
| operations | Yes | 1-100 connect/disconnect operations applied as one atomic batch. |