private static void NativeError(string namesection, string txt) { namesection ??= MelonUtils.GetMelonFromStackTrace()?.Info?.Name?.Replace(" ", "_"); Internal_Error(namesection, txt ?? "null"); RunErrorCallbacks(namesection, txt ?? "null"); }
private static void SendWarning(string txt) { string namesection = null; MelonBase melon = MelonUtils.GetMelonFromStackTrace(); if (melon != null) { namesection = melon.Info.Name; } ManualWarning(namesection, txt); }
private static void SendMsg(ConsoleColor msgcolor, string msg) { ConsoleColor meloncolor = MelonLogger.DefaultMelonColor; string namesection = null; MelonBase melon = MelonUtils.GetMelonFromStackTrace(); if (melon != null) { namesection = melon.Info.Name.Replace(" ", "_"); msgcolor = melon.ConsoleColor; } Internal_Msg(meloncolor, msgcolor, namesection, msg); MsgCallbackHandler?.Invoke(meloncolor, msgcolor, namesection, msg); }
private static void SendMsg(ConsoleColor txtcolor, string txt) { ConsoleColor meloncolor = DefaultMelonColor; string namesection = null; MelonBase melon = MelonUtils.GetMelonFromStackTrace(); if (melon != null) { namesection = melon.Info.Name.Replace(" ", "_"); meloncolor = melon.ConsoleColor; } Internal_Msg(meloncolor, txtcolor, namesection, txt); RunMsgCallbacks(meloncolor, txtcolor, namesection, txt); }
private static void SendMsg(ConsoleColor txtcolor, string txt) { ConsoleColor meloncolor = DefaultMelonColor; string namesection = null; MelonBase melon = MelonUtils.GetMelonFromStackTrace(); if (melon != null) { namesection = melon.Info.Name.Replace(" ", "_"); meloncolor = melon.ConsoleColor; } PushMessageToBepInEx(namesection, txt, LogLevel.Message); RunMsgCallbacks(meloncolor, txtcolor, namesection, txt ?? "null"); }
private static void NativeMsg(ConsoleColor namesection_color, ConsoleColor txt_color, string namesection, string txt) { if (string.IsNullOrEmpty(namesection)) { MelonBase melon = MelonUtils.GetMelonFromStackTrace(); if (melon != null) { namesection = melon.Info?.Name?.Replace(" ", "_"); namesection_color = melon.ConsoleColor; } } Internal_Msg(namesection_color, txt_color, namesection, txt ?? "null"); RunMsgCallbacks(namesection_color, txt_color, namesection, txt ?? "null"); }
private static void SendError(string txt) => ManualMelonError(MelonUtils.GetMelonFromStackTrace(), txt ?? "null");