From c55678ff9d65c9b91753e53a94ff3ce54c36bdc5 Mon Sep 17 00:00:00 2001 From: Roms1383 Date: Sat, 27 Apr 2024 23:13:16 +0700 Subject: [PATCH] :loud_sound: make log easily available to players LogChannel trick is neat, but players generally cannot be bothered --- scripts/Addicted/Utils.reds | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/Addicted/Utils.reds b/scripts/Addicted/Utils.reds index 2db0b845..35d66a07 100644 --- a/scripts/Addicted/Utils.reds +++ b/scripts/Addicted/Utils.reds @@ -1,13 +1,9 @@ module Addicted.Utils // auto-disabled when LogChannel not in scope -public static func E(str: String) -> Void { +public static func E(msg: String) -> Void { if ShowDebugLogsAddicted() { - let fun = Reflection.GetGlobalFunction(n"LogChannel"); - let msg = s"[Addicted] \(str)"; - if IsDefined(fun) { - fun.Call([n"DEBUG", AsRef(msg)]); - } + ModLog(n"Addicted", AsRef(msg)); } }