@@ -108,9 +108,9 @@ class ModLoaderLogEntry:
108108 ## [param exclude_type] ([bool]): (Optional) If true, the log type (e.g., DEBUG, WARN) will be excluded from the prefix. Default is false.[br]
109109 ## [br]
110110 ## [b]Returns:[/b] [String]
111- func get_prefix (exclude_type : bool = false ) -> String :
111+ func get_prefix (exclude_type : = false ) -> String :
112112 return "%s%s : " % [
113- "" if exclude_type else type .to_upper () + " " ,
113+ "" if exclude_type else " %s " % type .to_upper (),
114114 mod_name
115115 ]
116116
@@ -402,8 +402,8 @@ static func get_all_entries_as_string(log_entries: Array) -> Array:
402402# Internal log functions
403403# =============================================================================
404404
405- static func _print_rich (prefix : String , message : String , color : Color , bold := true ):
406- if OS .has_feature ( " editor" ) :
405+ static func _print_rich (prefix : String , message : String , color : Color , bold := true ) -> void :
406+ if ModLoaderStore .has_feature . editor :
407407 var prefix_text := "[b]%s [/b]" % prefix if bold else prefix
408408 print_rich ("[color=%s ]%s [/color]%s " % [
409409 color .to_html (false ),
@@ -444,7 +444,7 @@ static func _log(message: String, mod_name: String, log_type: String = "info", o
444444 _write_to_log_file (JSON .stringify (get_stack (), " " ))
445445 assert (false , message )
446446 "error" :
447- if OS .has_feature ( " editor" ) :
447+ if ModLoaderStore .has_feature . editor :
448448 printerr (log_entry .get_prefix (true ) + message )
449449 else :
450450 printerr (log_entry .get_prefix () + message )
@@ -468,8 +468,9 @@ static func _log(message: String, mod_name: String, log_type: String = "info", o
468468 _print_rich (log_entry .get_prefix (), message , debug_color , debug_bold )
469469 _write_to_log_file (log_entry .get_entry ())
470470 "hint" :
471- if OS .has_feature ("editor" ) and verbosity >= VERBOSITY_LEVEL .DEBUG :
472- _print_rich (log_entry .get_prefix (), message , hint_color )
471+ if ModLoaderStore .has_feature .editor :
472+ if verbosity >= VERBOSITY_LEVEL .DEBUG :
473+ _print_rich (log_entry .get_prefix (), message , hint_color )
473474
474475
475476static func _is_mod_name_ignored (mod_name : String ) -> bool :
0 commit comments