Skip to content

Commit 4babf49

Browse files
bug: fix editor feature check
doesn't error when ModLoaderStore isn't initialized
1 parent 436e996 commit 4babf49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addons/mod_loader/api/log.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ static func get_all_entries_as_string(log_entries: Array) -> Array:
403403
# =============================================================================
404404

405405
static func _print_rich(prefix: String, message: String, color: Color, bold := true) -> void:
406-
if ModLoaderStore.has_feature.editor:
406+
var in_editor: bool = OS.has_feature("editor") if not ModLoaderStore else ModLoaderStore.has_feature.editor
407+
if in_editor:
407408
var prefix_text := "[b]%s[/b]" % prefix if bold else prefix
408409
print_rich("[color=%s]%s[/color]%s" % [
409410
color.to_html(false),

0 commit comments

Comments
 (0)