Root nodes join through ModRoot.AddDeferred, so a reload that unloads the mod first never hands Godot a freed node
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
033192dcc9
commit
93ebb12c58
3 files changed
+3
-3
No files matched your search
@@ -25,7 +25,7 @@ namespace Cthangover.Tools.Tests.InGamePlay
|
|||||||
|
|
||||||
driverQueued = true;
|
driverQueued = true;
|
||||||
GameLogger.Log("TEST", "InGamePlayTestInitializer: activating in-game play-test test");
|
GameLogger.Log("TEST", "InGamePlayTestInitializer: activating in-game play-test test");
|
||||||
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new InGamePlayTestDriverNode());
|
ModRoot.AddDeferred(new InGamePlayTestDriverNode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ namespace Cthangover.Tools.Tests.NovelFlow
|
|||||||
.Select(a => a.Substring("--shots=".Length))
|
.Select(a => a.Substring("--shots=".Length))
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
GameLogger.Log("TEST", $"NovelFlowTestInitializer: activating novel_flow, shots={shots ?? "off"}");
|
GameLogger.Log("TEST", $"NovelFlowTestInitializer: activating novel_flow, shots={shots ?? "off"}");
|
||||||
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new NovelFlowTestDriver(shots));
|
ModRoot.AddDeferred(new NovelFlowTestDriver(shots));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ namespace Cthangover.Tools.Tests.Windows
|
|||||||
|
|
||||||
driverQueued = true;
|
driverQueued = true;
|
||||||
GameLogger.Log("TEST", $"ToolWindowsTestInitializer: activating tool windows test, shots='{shots ?? ""}'");
|
GameLogger.Log("TEST", $"ToolWindowsTestInitializer: activating tool windows test, shots='{shots ?? ""}'");
|
||||||
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new ToolWindowsTestDriverNode(shots));
|
ModRoot.AddDeferred(new ToolWindowsTestDriverNode(shots));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user