Constructor input for SohlActionContext. Every field is optional except that a speaker must be supplied (validated at construction).

interface Data<S extends UnknownObject = UnknownObject> {
    noChat: boolean;
    scope: S;
    skipDialog: boolean;
    speaker:
        | sohl.core.logic.SohlSpeaker
        | Partial<sohl.core.logic.SohlSpeaker.Data>;
    target: SohlActorLogic<any>;
    thisLogic?: SohlLogic<any>;
    title: string;
    type: string;
}

Type Parameters

  • S extends UnknownObject = UnknownObject

    Shape of the scope payload.

Properties

noChat: boolean

Suppress chat-card output.

scope: S

Arbitrary per-action payload.

skipDialog: boolean

Skip the action's configuration dialog.

The speaker, as a sohl.core.logic.SohlSpeaker or its data.

target: SohlActorLogic<any>

The target token/actor; normalized to a token document.

thisLogic?: SohlLogic<any>

The Logic of the document the action runs on (stamped at dispatch).

title: string

Human-readable title.

type: string

Action type discriminator.