From 2d4682b3b873e442e1763213ce0d1a8b70978c82 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 20:32:36 +0200 Subject: [PATCH] Invoke dialogue handler on setRuntimeDialogueHandler update --- src/runtime-three/runtime-host.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index 125e2ce8..33235aa2 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -576,6 +576,10 @@ export class RuntimeHost { handler: ((dialogue: RuntimeDialogueState | null) => void) | null ) { this.runtimeDialogueHandler = handler; + + if (handler !== null) { + handler(this.currentDialogue); + } } advanceRuntimeDialogue() { @@ -600,7 +604,11 @@ export class RuntimeHost { } this.setRuntimeDialogue( - this.createRuntimeDialogueState(dialogue.id, nextLineIndex) + this.createRuntimeDialogueState( + dialogue.id, + nextLineIndex, + this.currentDialogue.source + ) ); }