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

giveOrder

giveOrder<Stage, Refusal>(step, giveOrderOptions): GiveOrderResult<Refusal>

Gives an order of kind: the kind’s plan reads the station, then the order counts against maxPerStation, then a worker takes it, the one named or the kind’s chooseWorker. The worker’s routine walks it to the first stage, and the kind’s work moves it on. On the authoritative step, from a game’s own command or system; the give command calls it for a page.

Type Parameter
Stage extends string
Refusal extends string
Parameter Type
step AuthoritativeStep
giveOrderOptions GiveOrderOptions<Stage, Refusal>

GiveOrderResult<Refusal>

const result = giveOrder(step, { kind: chop, station: tree, player: command.player });