blob: ea4a157d7f0ccce47a1ff669bc86d88220f7bd64 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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)
print("Set debug mode to: ", value)
func is_debug_mode() -> bool:
return ProjectSettings.get_setting("openvic/debug/enabled", false)
|