Skip to content

Commit c5f35ad

Browse files
dev_log: Add an option to enable them without the CLI option
1 parent d7992d9 commit c5f35ad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

loader/mod_loader.gd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ const REQUIRE_CMD_LINE = false
4545
# PRefix for this file when using mod_log or dev_log
4646
const LOG_NAME = "ModLoader"
4747

48+
# Enables logging messages made with dev_log. Usually these are enabled with the
49+
# command line arg `--mod-dev`, but you can also enable them this way if you're
50+
# debugging in the editor. Don't forget to set this back to `false` when
51+
# distrubuting compiled builds!
52+
const ENABLE_DEV_LOG = false
53+
4854
# Stores data for every found/loaded mod
4955
var mod_data = {}
5056

@@ -104,7 +110,7 @@ func _init():
104110

105111

106112
func dev_log(text:String, mod_name:String = "", pretty:bool = false):
107-
if(_check_cmd_line_arg("--mod-dev")):
113+
if ENABLE_DEV_LOG || (_check_cmd_line_arg("--mod-dev")):
108114
mod_log(text, mod_name, pretty)
109115

110116

0 commit comments

Comments
 (0)