aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/Autoload/Argument/ArgumentParser.gd
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2024-01-22 11:36:03 +0100
committer GitHub <noreply@github.com>2024-01-22 11:36:03 +0100
commit069f07a16daf04982677182caf39498e1539f3f0 (patch)
treebb8d68e013c3a815f1a1e418e564f03a9a2a451b /game/src/Game/Autoload/Argument/ArgumentParser.gd
parent0840fd621cf35201f1e5ef90ad09033a2242b181 (diff)
parent9bca5cf3206a54b2e587cefab80d9dbcbbd002af (diff)
Merge pull request #198 from Spartan322/add/vic2-file-picker
Add Victoria 2 Folder Picker dialog
Diffstat (limited to 'game/src/Game/Autoload/Argument/ArgumentParser.gd')
-rw-r--r--game/src/Game/Autoload/Argument/ArgumentParser.gd8
1 files changed, 4 insertions, 4 deletions
diff --git a/game/src/Game/Autoload/Argument/ArgumentParser.gd b/game/src/Game/Autoload/Argument/ArgumentParser.gd
index 96b6631..1b68cad 100644
--- a/game/src/Game/Autoload/Argument/ArgumentParser.gd
+++ b/game/src/Game/Autoload/Argument/ArgumentParser.gd
@@ -82,7 +82,7 @@ func _set_argument_setting() -> void:
argument_dictionary[option.name] = option.default_value
_parse_argument_list(argument_dictionary, OS.get_cmdline_args())
- _parse_argument_list(argument_dictionary, OS.get_cmdline_user_args())
+ _parse_argument_list(argument_dictionary, OS.get_cmdline_user_args(), true)
ProjectSettings.set_setting(argument_setting_path, argument_dictionary)
@@ -207,7 +207,7 @@ func _add_argument(dictionary : Dictionary, option : ArgumentOption, argument :
dictionary[option.name] = argument
-func _parse_argument_list(dictionary : Dictionary, arg_list : PackedStringArray) -> Dictionary:
+func _parse_argument_list(dictionary : Dictionary, arg_list : PackedStringArray, is_game_args : bool = false) -> Dictionary:
var current_key : String = ""
var current_option : ArgumentOption = null
for arg in arg_list:
@@ -282,8 +282,8 @@ func _parse_argument_list(dictionary : Dictionary, arg_list : PackedStringArray)
dictionary[current_option.name] = true
else:
push_warning("Argument '%s' treated like a boolean but does not support a boolean value, skipping." % key)
- else:
- push_warning("Non argument '%s' found, skipping." % arg)
+ elif is_game_args:
+ push_warning("Non-argument '%s' found, skipping." % arg)
return dictionary