mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
do this properly
This commit is contained in:
parent
8f7b351d79
commit
385ebd543e
@ -16,19 +16,20 @@ public static class DebugLog
|
||||
|
||||
public static void ToConsole(string message, MessageType type = MessageType.Message)
|
||||
{
|
||||
if (QSBCore.Helper == null)
|
||||
{
|
||||
// yes i know this is only meant for OWML, but it's useful as a backup
|
||||
ModConsole.OwmlConsole.WriteLine(message, type, GetCallingType());
|
||||
return;
|
||||
}
|
||||
|
||||
if (QSBCore.DebugSettings.InstanceIdInLogs)
|
||||
{
|
||||
message = $"[{ProcessInstanceId}] " + message;
|
||||
}
|
||||
|
||||
QSBCore.Helper.Console.WriteLine(message, type, GetCallingType());
|
||||
if (QSBCore.Helper == null)
|
||||
{
|
||||
// yes i know this is only meant for OWML, but it's useful as a backup
|
||||
ModConsole.OwmlConsole.WriteLine(message, type, GetCallingType());
|
||||
}
|
||||
else
|
||||
{
|
||||
QSBCore.Helper.Console.WriteLine(message, type, GetCallingType());
|
||||
}
|
||||
}
|
||||
|
||||
public static void ToHud(string message)
|
||||
@ -50,13 +51,6 @@ public static class DebugLog
|
||||
|
||||
public static void DebugWrite(string message, MessageType type = MessageType.Message)
|
||||
{
|
||||
if (QSBCore.Helper == null)
|
||||
{
|
||||
// yes i know this is only meant for OWML, but it's useful as a backup
|
||||
ModConsole.OwmlConsole.WriteLine(message, type, GetCallingType());
|
||||
return;
|
||||
}
|
||||
|
||||
if (QSBCore.DebugSettings.DebugMode)
|
||||
{
|
||||
ToConsole(message, type);
|
||||
|
Loading…
Reference in New Issue
Block a user