Reference · Rockets, variants, parts and the fit check
flightNowfunction
The assembly flight underway at at: flights are the build steps in the order they start, named like an ISS flight.
Import it
import { flightNow } from "@johnmorrisdotca/uchusen-rockets";
Definition
function flightNow(steps: readonly PlayStep[], at: number): { n: number; slot: string; title: string; } | null
Parameters
| Name | Type | Description |
|---|---|---|
steps | readonly PlayStep[] | The ship's build order. |
at | number | How far through the build, from 0 to 1. |
Returns
{ n: number; slot: string; title: string; } | null
The flight number, the slot and its title, or null when there are no steps.
Examples
import { buildOf, flightNow } from "@johnmorrisdotca/uchusen-rockets";
const now = flightNow(buildOf("miyamoto") ?? [], 0);
console.log(now?.n, now?.title);1 DriveWhat it prints (run when this page was built)