Reference · Rockets, variants, parts and the fit check
Assemblytype
A ship put together: its places, its mass and size, and the problems found.
Import it
import type { Assembly } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface Assembly {
placed: Placed[];
issues: ShipIssue[];
mass: number;
propellant: number;
length: number;
width: number;
depth: number;
ok: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
placed | Placed[] | |
issues | ShipIssue[] | |
mass | number | Dry mass in tonnes, propellant when full in tonnes. |
propellant | number | |
length | number | Metres: the box the placed modules fill (from their declared sizes). |
width | number | |
depth | number | |
ok | boolean |
Examples
import { assemble, type Assembly } from "@johnmorrisdotca/uchusen-rockets";
const ship: Assembly = assemble([{ module: "engine-fusion-3" }, { module: "tank-cryo-12" }]);
console.log(ship.ok, ship.placed.length, ship.mass);true 2 940What it prints (run when this page was built)