Skip to content

Commit

Permalink
🔊 make log easily available to players
Browse files Browse the repository at this point in the history
LogChannel trick is neat, but players generally cannot be bothered
  • Loading branch information
Roms1383 committed Apr 27, 2024
1 parent cb26232 commit c55678f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scripts/Addicted/Utils.reds
Original file line number Diff line number Diff line change
@@ -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));
}
}

Expand Down

0 comments on commit c55678f

Please sign in to comment.