From e3d943c3e8a919c2e8ccac3b70709477bfd691e1 Mon Sep 17 00:00:00 2001 From: MASSHUU12 Date: Tue, 20 Aug 2024 13:01:33 +0200 Subject: [PATCH] fix: Confirma run tests & closes immediately after start instead of launching the game --- CHANGELOG.md | 7 +++++++ .../src/scenes/confirma_autoload/ConfirmaAutoload.cs | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 550d09dc..d3bf8056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [Unreleased] + +### Fixed + +- `NullReferenceException` when there is not GDScript tests. +- Confirma run tests and closes immediately after start instead of launching the game. + ## [0.8.0-beta 2024-08-18] ### Added diff --git a/addons/confirma/src/scenes/confirma_autoload/ConfirmaAutoload.cs b/addons/confirma/src/scenes/confirma_autoload/ConfirmaAutoload.cs index 154f370c..e1de8c5a 100644 --- a/addons/confirma/src/scenes/confirma_autoload/ConfirmaAutoload.cs +++ b/addons/confirma/src/scenes/confirma_autoload/ConfirmaAutoload.cs @@ -26,11 +26,6 @@ public override void _Ready() return; } - if (!Props.RunTests && !Engine.IsEditorHint()) - { - GetTree().Quit(); - } - Props.Autoload = this; SetupGlobals(); @@ -184,6 +179,11 @@ private static string ParseArgumentContent(string argument) private void ChangeScene() { + if (!Props.RunTests) + { + return; + } + _ = GetTree().CallDeferred("change_scene_to_file", "uid://cq76c14wl2ti3"); if (!Engine.IsEditorHint())