Reference · Rockets, variants, parts and the fit check
swarmJobsfunction
Which slot each drone works at at. Drones split across the steps the build order has running, and a step that has not started gets none.
Import it
import { swarmJobs } from "@johnmorrisdotca/uchusen-rockets";
Definition
function swarmJobs(steps: readonly PlayStep[], count: number, at: number): SwarmJob[]
Parameters
| Name | Type | Description |
|---|---|---|
steps | readonly PlayStep[] | The ship's build order. |
count | number | How many drones are on the ship. |
at | number | How far through the build, from 0 to 1. |
Returns
SwarmJob[]
One job per drone. Empty when nothing is being built, or when the count is 0.
Examples
import { buildOf, swarmJobs } from "@johnmorrisdotca/uchusen-rockets";
const steps = buildOf("miyamoto");
console.log(steps ? swarmJobs(steps, 24, 0)[0]?.slot : "");driveWhat it prints (run when this page was built)