diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-06-14 05:29:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 05:29:21 +0200 |
commit | 40cf0fa95e325f3bf875e42c11254da23192f506 (patch) | |
tree | e52a31ca0a52522c2ca08a6ddfdc1e8f9507c3dc /game/src/Game/Autoload/Events/GameDebug.gd | |
parent | acda3217349a0ebdb8b48a3787cb15d8eb250e7c (diff) | |
parent | cd7a5260d4d2791f98f284cf0bea905bda18cbe8 (diff) |
Merge pull request #133 from Spartan322/argparser-corrections
Diffstat (limited to 'game/src/Game/Autoload/Events/GameDebug.gd')
-rw-r--r-- | game/src/Game/Autoload/Events/GameDebug.gd | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/game/src/Game/Autoload/Events/GameDebug.gd b/game/src/Game/Autoload/Events/GameDebug.gd index ea4a157..9e18343 100644 --- a/game/src/Game/Autoload/Events/GameDebug.gd +++ b/game/src/Game/Autoload/Events/GameDebug.gd @@ -1,22 +1,9 @@ extends RefCounted class_name GameDebugSingleton -# REQUIREMENTS: -# * SS-56 -func _init(): - for engine_args in OS.get_cmdline_args(): - match(engine_args): - "--game-debug": - set_debug_mode(true) - - for engine_args in OS.get_cmdline_user_args(): - match(engine_args): - "--game-debug", "-d", "--debug", "--debug-mode": - set_debug_mode(true) - func set_debug_mode(value : bool) -> void: - ProjectSettings.set_setting("openvic/debug/enabled", value) + ArgumentParser.set_argument(&"game-debug", value) print("Set debug mode to: ", value) func is_debug_mode() -> bool: - return ProjectSettings.get_setting("openvic/debug/enabled", false) + return ArgumentParser.get_argument(&"game-debug", false) |