Event-driven dialog queue, story flag command, mod unit tests
Push-based event chains, runtime fixes (single end, goto lifecycle, if, busy box, held delay, empty options, timed/animated/effect actions), the 'flag name value' DSL command, autoplay --dialogs=N, 19 mod unit tests.
This commit is contained in:
1 parent
9f86bdbb0c
commit
bd55716349
86 files changed
+3173
-2181
No files matched your search
@@ -44,6 +44,7 @@ namespace Mods.TestRunner
|
||||
|
||||
var choices = ParseChoices(args);
|
||||
var timeout = ParseTimeout(args);
|
||||
var dialogs = ParseDialogs(args);
|
||||
|
||||
// Godot. квалифицирован: в dev-компиляции модов (ToolsModCompileTests)
|
||||
// в глобальном пространстве имён существует namespace Engine из тестовой сборки,
|
||||
@@ -57,12 +58,12 @@ namespace Mods.TestRunner
|
||||
|
||||
driverQueued = true;
|
||||
GameLogger.Log("TEST",
|
||||
$"TestRunnerInitializer: activating dialog auto-driver, choices=[{string.Join(",", choices)}], timeout={timeout?.ToString() ?? "none"}s");
|
||||
$"TestRunnerInitializer: activating dialog auto-driver, choices=[{string.Join(",", choices)}], timeout={timeout?.ToString() ?? "none"}s, dialogs={dialogs?.ToString() ?? "idle"}");
|
||||
|
||||
// Deferred: сцена ещё строится; драйвер внутри сам выдерживает
|
||||
// стартовую паузу и лениво ищет DialogBox, поэтому порядок с
|
||||
// загрузкой сцены не важен.
|
||||
root.CallDeferred("add_child", new DialogAutoDriverNode(choices, timeout));
|
||||
root.CallDeferred("add_child", new DialogAutoDriverNode(choices, timeout, dialogs));
|
||||
}
|
||||
|
||||
private static List<int> ParseChoices(string[] args)
|
||||
@@ -80,6 +81,15 @@ namespace Mods.TestRunner
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private static int? ParseDialogs(string[] args)
|
||||
{
|
||||
var raw = args
|
||||
.Where(a => a.StartsWith("--dialogs=", System.StringComparison.Ordinal))
|
||||
.Select(a => a.Substring("--dialogs=".Length))
|
||||
.FirstOrDefault();
|
||||
return int.TryParse(raw, out var n) && n > 0 ? n : null;
|
||||
}
|
||||
|
||||
private static float? ParseTimeout(string[] args)
|
||||
{
|
||||
var raw = args
|
||||
|
||||
Reference in new issue
Block a user