Resolve dialog box after battle scene rebuilds

This commit is contained in:
cthangover committed 2026-10-27 01:07:28 +01:00
1 parent d1b2cae314
commit ab6849d089
1 file changed
+4
@@ -205,6 +205,10 @@ namespace Cthangover.Mods.Dialog.Executable
if (!IsInstanceValid(this) || !IsInsideTree() || !isActive) if (!IsInstanceValid(this) || !IsInsideTree() || !isActive)
return; 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>("DialogBox");
if (dialogBox == null || !IsInstanceValid(dialogBox) || !dialogBox.IsActive || dialogBox.IsRunning) if (dialogBox == null || !IsInstanceValid(dialogBox) || !dialogBox.IsActive || dialogBox.IsRunning)
return; return;