Skip to content

Commit eac8d50

Browse files
mod_log: Use a default string ("Unknown-Mod") if no mod name was passed
1 parent a8e0bb8 commit eac8d50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

loader/mod_loader.gd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ func dev_log(text:String, mod_name:String = "", pretty:bool = false):
117117
# Log info for a mod. Accepts the mod name as the 2nd arg, which prefixes
118118
# the logged string with "{mod_name}: "
119119
func mod_log(text:String, mod_name:String = "", pretty:bool = false)->void:
120+
if mod_name == "":
121+
mod_name = "Unknown-Mod"
122+
120123
# Prefix with "{mod_name}: "
121-
if mod_name != "":
122-
text = mod_name + ": " + text
124+
text = mod_name + ": " + text
123125

124126
var date_time = Time.get_datetime_dict_from_system()
125127
var date_time_string = str(date_time.day,'.',date_time.month,'.',date_time.year,' - ', date_time.hour,':',date_time.minute,':',date_time.second)

0 commit comments

Comments
 (0)