From ab6849d08999ba6b8570f5d185df64664ac1b279 Mon Sep 17 00:00:00 2001 From: iisaev Date: Tue, 27 Oct 2026 01:07:28 +0100 Subject: [PATCH] Resolve dialog box after battle scene rebuilds --- src/UI/Executable/ExecutableMainEventChain.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/UI/Executable/ExecutableMainEventChain.cs b/src/UI/Executable/ExecutableMainEventChain.cs index 0f098cf..bc57ec1 100644 --- a/src/UI/Executable/ExecutableMainEventChain.cs +++ b/src/UI/Executable/ExecutableMainEventChain.cs @@ -205,6 +205,10 @@ namespace Cthangover.Mods.Dialog.Executable if (!IsInstanceValid(this) || !IsInsideTree() || !isActive) return; + // Shell rebuilds after battles may make the early _Ready lookup miss. + // Resolve again on the deferred scan, after SceneManager clears scene caches. + if (dialogBox == null || !IsInstanceValid(dialogBox)) + dialogBox = SceneContextNode.FindNode("DialogBox"); if (dialogBox == null || !IsInstanceValid(dialogBox) || !dialogBox.IsActive || dialogBox.IsRunning) return;