using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using Notiffy.API; using PluginConfig.API; using PluginConfig.API.Decorators; using PluginConfig.API.Fields; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("UltraNotifPack")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("UltraNotifPack")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("bdd19282-1499-46f9-85b8-6cf2de9cb1c0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace ConsoleNotifier; [BepInPlugin("eepynico.ultranotifier", "ULTRAKILL Logging Notifier", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public static PluginConfigurator config; public static BoolField showLogs; public static BoolField showWarnings; public static BoolField showErrors; private ConsoleListener listener; private void Awake() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown config = PluginConfigurator.Create("ULTRAKILL Logging Notifier", "eepynico.ultranotifier"); new ConfigHeader(config.rootPanel, "Notifications", 24); showLogs = new BoolField(config.rootPanel, "Show Logs", "showLogs", false); showWarnings = new BoolField(config.rootPanel, "Show Warnings", "showWarnings", false); showErrors = new BoolField(config.rootPanel, "Show Errors", "showErrors", true); listener = new ConsoleListener(); Logger.Listeners.Add((ILogListener)(object)listener); } private void OnDestroy() { if (listener != null) { Logger.Listeners.Remove((ILogListener)(object)listener); } } } public class ConsoleListener : ILogListener, IDisposable { public void LogEvent(object sender, LogEventArgs e) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 LogLevel level = e.Level; LogLevel val = level; if ((int)val <= 4) { if (val - 1 > 1) { if ((int)val == 4 && Plugin.showWarnings.value) { NotificationSystem.NotifySend("Warning", string.Format("[{0}] {1}", e.Source, e.Data?.ToString() ?? ""), (Sprite)null, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "warning.png"), (Urgency)1, "NotifySend", 0u, (Dictionary)null, -1); } } else if (Plugin.showErrors.value) { NotificationSystem.NotifySend("Error", string.Format("[{0}] {1}", e.Source, e.Data?.ToString() ?? ""), (Sprite)null, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "error.png"), (Urgency)1, "NotifySend", 0u, (Dictionary)null, -1); } } else if (((int)val == 8 || (int)val == 16) && Plugin.showLogs.value) { NotificationSystem.NotifySend("Log", string.Format("[{0}] {1}", e.Source, e.Data?.ToString() ?? ""), (Sprite)null, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "log.png"), (Urgency)1, "NotifySend", 0u, (Dictionary)null, -1); } } public void Dispose() { } }