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
- order_id: current assignment-order identity.
- expected_order_revision: current order revision.
Returns
A fixed-tick receipt with the cancellation result.
Cost
One indexed assignment lookup and bounded owner reconciliation.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
expected_order_revision | revision | none | yes | Expected assignment-order revision. |
order_id | stable-id | none | yes | Current assignment-order identity. |
Errors
error.command-budget-exhaustederror.command-owner-rejectederror.command-queue-fullerror.invalid-commanderror.restricted-command
Examples
command.submit("command.work.cancel", {order_id = assignment.order_id, expected_order_revision = assignment.order_revision}, 1)
API history
- 1.5.0: Player Work cancellation added for Phase 16D.