Invoke dialogue handler on setRuntimeDialogueHandler update

This commit is contained in:
2026-04-14 20:32:36 +02:00
parent 600c330b68
commit 2d4682b3b8

View File

@@ -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
)
);
}