diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-01-20 00:00:31 +0100 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-01-22 01:57:27 +0100 |
commit | 9bca5cf3206a54b2e587cefab80d9dbcbbd002af (patch) | |
tree | bb8d68e013c3a815f1a1e418e564f03a9a2a451b /game/src/Game/Autoload/Argument/ArgumentParser.gd | |
parent | 0840fd621cf35201f1e5ef90ad09033a2242b181 (diff) |
Add Victoria 2 Folder Picker dialog
Move Localization.initialize to beginning of GameStart._ready
Move compatibility mode paths search to separate _setup_compatibility_mode_paths
Move _setup_compatibility_mode_paths call to GameStart._ready
Fix `Non-argument '%s' found, skipping.` warning for Godot command line arguments
Diffstat (limited to 'game/src/Game/Autoload/Argument/ArgumentParser.gd')
-rw-r--r-- | game/src/Game/Autoload/Argument/ArgumentParser.gd | 8 |
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 |