LSDE Dialog Engine / ActionContext
Interface: ActionContext
Defined in: types.ts:388
What an ACTION handler gets.
Extends
Properties
actors
actors:
Card[]
Defined in: types.ts:316
Every card the block cites, resolved through the export's cards table, in file order.
Inherited from
calls
calls:
ActionCall[]
Defined in: types.ts:390
The calls the block asks the game to run, in order, with their arguments BY NAME.
character
character:
Card|undefined
Defined in: types.ts:314
The actor onResolveCharacter() picked for this block, or undefined.
A block lists a CAST in actors — card ids, in an order LSDE deliberately refuses to give a meaning to. Whether the first one speaks, whether they all do, whether the rest are simply present is the game's call, so the engine hands the whole list to onResolveCharacter() and keeps whatever comes back. It does not elect a first one, the way v1 did.
Inherited from
emotion
emotion:
Card|undefined
Defined in: types.ts:324
The emotion of the block, resolved through cards — the TONE of the line, not of a speaker.
In v1 each character carried its own emotion, which meant writing the same feeling twice for two actors saying one sentence, and being free to desynchronise them by accident. A block is one line and one line has one tone; actors says who may carry it.
Inherited from
intensity
intensity:
number|undefined
Defined in: types.ts:326
How strongly, when the writer set an emotion. Passed through untouched.
Inherited from
preventGlobalHandler
preventGlobalHandler: () =>
void
Defined in: types.ts:328
Stop the global (Tier 1) handler from running after this scene handler.
Returns
void
Inherited from
BaseBlockContext.preventGlobalHandler
reject
reject: (
error?) =>void
Defined in: types.ts:400
A call failed. The flow leaves by catch, or by then when no error branch was drawn.
The error is OPTIONAL and the engine does nothing with it: routing only needs to know that the call failed. Pass one if it reads better next to your own logging — nothing here reads it, forwards it or logs it.
Parameters
error?
unknown
Returns
void
resolve
resolve: () =>
void
Defined in: types.ts:392
The calls went through. The flow leaves by then.
Returns
void
