diff --git a/test_suites/ingame_play/src/InGamePlayTestInitializer.cs b/test_suites/ingame_play/src/InGamePlayTestInitializer.cs index 053a933..71bbb0a 100644 --- a/test_suites/ingame_play/src/InGamePlayTestInitializer.cs +++ b/test_suites/ingame_play/src/InGamePlayTestInitializer.cs @@ -25,7 +25,7 @@ namespace Cthangover.Tools.Tests.InGamePlay driverQueued = true; 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()); } } } diff --git a/test_suites/novel_flow/src/NovelFlowTestInitializer.cs b/test_suites/novel_flow/src/NovelFlowTestInitializer.cs index 47e70be..6f8b990 100644 --- a/test_suites/novel_flow/src/NovelFlowTestInitializer.cs +++ b/test_suites/novel_flow/src/NovelFlowTestInitializer.cs @@ -31,7 +31,7 @@ namespace Cthangover.Tools.Tests.NovelFlow .Select(a => a.Substring("--shots=".Length)) .FirstOrDefault(); 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)); } } } diff --git a/test_suites/windows/src/ToolWindowsTestInitializer.cs b/test_suites/windows/src/ToolWindowsTestInitializer.cs index 69af2e7..f0c9e04 100644 --- a/test_suites/windows/src/ToolWindowsTestInitializer.cs +++ b/test_suites/windows/src/ToolWindowsTestInitializer.cs @@ -37,7 +37,7 @@ namespace Cthangover.Tools.Tests.Windows driverQueued = true; 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)); } } }