From cd7a5260d4d2791f98f284cf0bea905bda18cbe8 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Tue, 13 Jun 2023 02:00:57 -0400 Subject: Fix ArgumentParser excluding last character for arg key Fix ArgumentParser ignoring full name boolean arguments Add warning for ArgumentParser parsing a non-boolean standalone argument Move SS-56 requirement to ArgumentParser scene Add has_argument_support, get_argument, and set_argument to ArgumentParser Update `GameDebug.gd` to rely on `ArgumentParser.get_argument` Update `Events.gd` to rely on `ArgumentParser.get_argument` Add shorthand alias argument non-alphabetic warning and skip Add shorthand alias argument validation for boolean with warning and skip Add shorthand alias missing warning Add length check for full name arguments in ArgumentParser Remove superfluous `-` in ArgumentParse scene aliases --- game/src/Game/Autoload/Argument/ArgumentParser.tscn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'game/src/Game/Autoload/Argument/ArgumentParser.tscn') diff --git a/game/src/Game/Autoload/Argument/ArgumentParser.tscn b/game/src/Game/Autoload/Argument/ArgumentParser.tscn index 09e5e6c..84ebd50 100644 --- a/game/src/Game/Autoload/Argument/ArgumentParser.tscn +++ b/game/src/Game/Autoload/Argument/ArgumentParser.tscn @@ -14,7 +14,7 @@ default_value = false [sub_resource type="Resource" id="Resource_j1to4"] script = ExtResource("2_4hguj") name = &"game-debug" -aliases = Array[StringName]([&"d", &"-debug", &"-debug-mode"]) +aliases = Array[StringName]([&"d", &"debug", &"debug-mode"]) type = 1 description = "Start in debug mode." default_value = false @@ -22,11 +22,12 @@ default_value = false [sub_resource type="Resource" id="Resource_tiax1"] script = ExtResource("2_4hguj") name = &"compatibility-mode" -aliases = Array[StringName]([&"-compat"]) +aliases = Array[StringName]([&"compat"]) type = 4 description = "Load Victoria 2 assets from this path." default_value = "" [node name="ArgumentParser" type="Node"] +editor_description = "SS-56" script = ExtResource("1_pc7xr") option_array = Array[ExtResource("2_4hguj")]([SubResource("Resource_tq3y4"), SubResource("Resource_j1to4"), SubResource("Resource_tiax1")]) -- cgit v1.2.3-56-ga3b1