LSDE Dialog Engine / BlockHandlerArgs
Interface: BlockHandlerArgs<B, C>
Defined in: types.ts:704
Arguments passed to any block handler.
Remarks
Every block handler receives this common structure. The generic B parameter provides the block type (DialogBlock, ChoiceBlock, etc.) and C provides the type-specific context (DialogContext, ChoiceContext, etc.).
The engine uses a two-tier handler system:
- Tier 2 (scene): registered via
handle.onDialog(),handle.onChoice(), etc. - Tier 1 (global): registered via
engine.onDialog(),engine.onChoice(), etc.
When a block is dispatched, the scene handler (Tier 2) is called first. The global handler (Tier 1) is then called after, unless context.preventGlobalHandler() was invoked.
A block-specific override via handle.onBlock(uuid, handler) takes highest priority.
See
- BlockHandler for the handler function signature
- SceneHandle for scene-level handler registration
- BaseBlockContext.preventGlobalHandler for suppressing Tier 1
Type Parameters
B
B extends BlueprintBlock
C
C extends BaseBlockContext
Properties
block
block:
B
Defined in: types.ts:708
The block being executed, typed to match the handler (e.g. DialogBlock for onDialog).
context
context:
C
Defined in: types.ts:710
Type-specific context providing actions for this block (e.g. selectChoice, resolve).
next
next: () =>
void
Defined in: types.ts:712
Advance the flow to the next block. Must be called exactly once to continue traversal.
Returns
void
scene
scene:
SceneHandle
Defined in: types.ts:706
The scene handle that owns this block. Use it to inspect state, cancel the scene, etc.
