command · command.work

Cancel work assignment

Cancels one current player assignment through Work.

command.work.cancel(order_id, expected_order_revision) -> command.receipt
Stable ID
command.work.cancel
Owner
game.work-lifecycle
Authority
request
Timing
fixed_tick
Availability
active-session
Side effects
may release one queued or active player assignment
Determinism
record request and Work result in engine sequence order
Introduced
1.5.0

Usage

Cancel the current live player assignment returned by world.work.assignment. Work and ControlAuthority reconcile the Actor without deleting the underlying autonomous job.

Parameters

Returns

A fixed-tick receipt with the cancellation result.

Cost

One indexed assignment lookup and bounded owner reconciliation.

Fields

IDTypeUnitsRequiredDescription
expected_order_revisionrevisionnoneyesExpected assignment-order revision.
order_idstable-idnoneyesCurrent assignment-order identity.

Errors

Examples

command.submit("command.work.cancel", {order_id = assignment.order_id, expected_order_revision = assignment.order_revision}, 1)

API history

Related symbols

Project references