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

endOrder

endOrder(step, worker, endOrderOptions?): void

Ends worker’s order: it emits OrderEndedEvent, stops the walk, and the worker’s routine goes back to the routine and step the order interrupted. A worker with no order is left as it is.

Parameter Type
step AuthoritativeStep
worker Entity
endOrderOptions EndOrderOptions

void

endOrder(step, worker, { reason: OrderEndReason.Cancelled });