Reference · Rockets, variants, parts and the fit check
stepPhasefunction
Which phase a step is in on day, and how far through that phase. Nothing before it starts or after it finishes.
Import it
import { stepPhase } from "@johnmorrisdotca/uchusen-rockets";
Definition
function stepPhase(step: PlayStep, day: number): { phase: BuildPhase; along: number; } | null
Parameters
| Name | Type | Description |
|---|---|---|
step | PlayStep | The build step. |
day | number | Days after the keel was laid. |
Returns
{ phase: BuildPhase; along: number; } | null
The phase, or null when the step is not underway.
Examples
import { stepPhase } from "@johnmorrisdotca/uchusen-rockets";
console.log(stepPhase({ slot: "drive", start: 0, days: 100 }, 4)?.phase);bringWhat it prints (run when this page was built)