Reference · Rockets, variants, parts and the fit check
swapsForfunction
The modules that swap for a module: those that share its slot, with the same collars and the same length. A mission pod is one: the survey pod and the medical pod stand in the same place on a ship.
Import it
import { swapsFor } from "@johnmorrisdotca/uchusen-rockets";
Definition
function swapsFor(id: string): KitModule[]
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A module's id. |
Returns
KitModule[]
The other modules of its slot, or none for a module with no slot.
Examples
import { swapsFor } from "@johnmorrisdotca/uchusen-rockets";
console.log(swapsFor("pod-survey-m").map((module) => module.name));[ 'Mission pod, medical and rescue' ]What it prints (run when this page was built)