Reference · Rockets, variants, parts and the fit check
assemblefunction
Puts a ship's list of modules in place and checks that every joint mates. On the spine each module stands on the end of the one before; hung from a port it stands on that port of an earlier place;
beside it stands parallel to the spine at an offset.
Import it
import { assemble } from "@johnmorrisdotca/uchusen-rockets";
Definition
function assemble(ship: ShipList): Assembly
Parameters
| Name | Type | Description |
|---|---|---|
ship | ShipList | A ship's list of places, the bottom of the spine first. |
Returns
Assembly
Where each module stands, the ship's mass and size, and any problem (a collar of the wrong class, an unknown module, a port that is not there or is taken).
Examples
import { assemble } from "@johnmorrisdotca/uchusen-rockets";
const ship = assemble([{ module: "engine-fusion-7" }, { module: "tank-cryo-12" }]);
console.log(ship.ok, ship.length, ship.mass);true 23.6 1660What it prints (run when this page was built)