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

moveCargo

moveCargo(writer, options): CargoResult

Moves up to count goods that pass filter from from to to, as many as fit, in one transaction: the game’s checkCargoTransfer sees each good before anything is written and may leave it where it is, and its onCargoTransfer runs inside the transaction, where a refusal or a throw puts every good back. A carrier gives its top first, a store its oldest. Two calls in one step see each other’s goods gone, so two carriers never take one good.

Parameter Type
writer Authority
options MoveCargoOptions

CargoResult