From 0ab5180b7d9974cd54b517fd3eacbd2e19d39041 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 28 Mar 2024 20:12:53 +0200 Subject: [PATCH 1/2] Update .gitignore (so the Debugging folder doesn't get ignored) --- .gitignore | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f8f684fb7..130c8f9af 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,12 @@ build/ bld/ [Bb]in/ [Oo]bj/ -[Dd]ebug*/ -[Rr]elease*/ +[Dd]ebugWindows/ +[Rr]eleaseWindows/ +[Dd]ebugMac/ +[Rr]eleaseMac/ +[Dd]ebugLinux/ +[Rr]eleaseLinux/ *.o # Misc vs crap From 945051708e1584e0683ed2e6bcf5defcc88af2ea Mon Sep 17 00:00:00 2001 From: Regalis11 Date: Thu, 28 Mar 2024 20:14:02 +0200 Subject: [PATCH 2/2] Added missing DebugConsoleCore file --- .../Debugging/DebugConsoleCore.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Libraries/BarotraumaLibs/BarotraumaCore/Debugging/DebugConsoleCore.cs diff --git a/Libraries/BarotraumaLibs/BarotraumaCore/Debugging/DebugConsoleCore.cs b/Libraries/BarotraumaLibs/BarotraumaCore/Debugging/DebugConsoleCore.cs new file mode 100644 index 000000000..4d3fe892a --- /dev/null +++ b/Libraries/BarotraumaLibs/BarotraumaCore/Debugging/DebugConsoleCore.cs @@ -0,0 +1,26 @@ +using System; +using Microsoft.Xna.Framework; + +namespace Barotrauma.Debugging; + +public static class DebugConsoleCore +{ + private static Action? newMessage; + private static Action? log; + + public static void Init(Action newMessage, Action log) + { + DebugConsoleCore.newMessage ??= newMessage; + DebugConsoleCore.log ??= log; + } + + public static void NewMessage(string msg, Color? color = null) + { + newMessage?.Invoke(msg, color ?? Color.White); + } + + public static void Log(string msg) + { + log?.Invoke(msg); + } +} \ No newline at end of file