Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

defineOrder

defineOrder<Stage, Refusal>(name, options): OrderHandle<Stage, Refusal>

Declares a kind of order at module scope: its stages, how one starts (plan) and how it moves on (work). The world installs it from orders({ kinds: [chop] }). As RimWorld’s JobDef and its driver’s toils, with the stages in the game’s own code, since a stage’s next station is often chosen as it runs.

Type Parameter Default type
Stage extends string -
Refusal extends string never
Parameter Type
name string
options OrderOptions<Stage, Refusal>

OrderHandle<Stage, Refusal>