From 0f45e0faffb5f98bf37bd70b7b905013e9feda90 Mon Sep 17 00:00:00 2001 From: D1GQ Date: Sun, 22 Sep 2024 20:24:45 -0500 Subject: [PATCH] Enable console --- Modules/Debugger.cs | 3 +++ main.cs | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/Modules/Debugger.cs b/Modules/Debugger.cs index d4a958d..e235e59 100644 --- a/Modules/Debugger.cs +++ b/Modules/Debugger.cs @@ -1,4 +1,6 @@  +using BepInEx; + namespace BetterAmongUs; class Logger @@ -10,6 +12,7 @@ class Logger string newLine = $"{mark}: {Utils.RemoveHtmlText(info)}"; File.AppendAllText(logFilePath, newLine + Environment.NewLine); Main.Logger.LogInfo($"[{tag}] {info}"); + ConsoleManager.ConsoleStream.WriteLine($"{DateTime.Now:HH:mm} BetterAmongUs[{tag}]: {info}"); } public static void LogHeader(string info, string tag = "LogHeader") => Log($" >-------------- {info} --------------<", tag); public static void LogCheat(string info, string tag = "AntiCheat") => Log(info, tag); diff --git a/main.cs b/main.cs index fa37047..b8ba49a 100644 --- a/main.cs +++ b/main.cs @@ -3,12 +3,14 @@ using BepInEx.Configuration; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using BetterAmongUs.Patches; +using Epic.OnlineServices.Presence; using HarmonyLib; using Il2CppInterop.Runtime.Injection; using Innersloth.IO; using System.Security.Cryptography; using System.Text; using UnityEngine; +using static UnityEngine.RemoteConfigSettingsHelper; namespace BetterAmongUs; @@ -153,6 +155,11 @@ public class Main : BasePlugin { try { + ConsoleManager.CreateConsole(); + ConsoleManager.SetConsoleTitle("Among Us - BAU Console"); + ConsoleManager.ConfigPreventClose.Value = true; + ConsoleManager.ConsoleStream.WriteLine($".--------------------------------------------------------------------------------.\r\n| ____ _ _ _ _ _ |\r\n| | __ ) ___| |_| |_ ___ _ __ / \\ _ __ ___ ___ _ __ __ _ | | | |___ |\r\n| | _ \\ / _ \\ __| __/ _ \\ '__| / _ \\ | '_ ` _ \\ / _ \\| '_ \\ / _` | | | | / __||\r\n| | |_) | __/ |_| || __/ | / ___ \\| | | | | | (_) | | | | (_| | | |_| \\__ \\|\r\n| |____/ \\___|\\__|\\__\\___|_| /_/ \\_\\_| |_| |_|\\___/|_| |_|\\__, | \\___/|___/|\r\n| |___/ |\r\n'--------------------------------------------------------------------------------'"); + Logger = BepInEx.Logging.Logger.CreateLogSource(PluginGuid); BetterDataManager.SetUp();