Cancellable beta
Interface of @v12-engine/engine
ts
export interface CancellableWhat a hook that may be stopped carries: cancel(reason?) stops it, cancelled says whether it was, and reason is what the player is told, for the hooks that tell them (canPlace, canHarvest, canCast, canTarget, requirement). The engine's own refusal comes in as cancelled already true, with its reason: cancelled = false lets it through
Members
cancel
ts
cancel(reason?: MessageRef): void;Stops the event, with the reason the player is told when given
cancelled
ts
cancelled: boolean;Whether a handler has stopped the event; cancel() sets it
reason
ts
reason?: MessageRef;What the player is told of why it was stopped, for the hooks that tell them