Introduce the LuaCsLogger class and make everything use that instead

This commit is contained in:
EvilFactory
2022-12-28 16:01:48 -03:00
parent 5807900556
commit 8fdf2156dc
16 changed files with 168 additions and 151 deletions
@@ -81,7 +81,7 @@ namespace Barotrauma
}
catch (Exception e)
{
GameMain.LuaCs.HandleException(e, LuaCsMessageOrigin.CSharpMod);
LuaCsLogger.HandleException(e, LuaCsMessageOrigin.CSharpMod);
}
timedActionsToRemove.Add(timedAction);
@@ -99,8 +99,8 @@ namespace Barotrauma
}
catch (NullReferenceException e)
{
GameMain.LuaCs.PrintError("Error while executing timers... This shouldn't happen... Why do we a NRE here???", LuaCsMessageOrigin.Unknown);
GameMain.LuaCs.HandleException(e, LuaCsMessageOrigin.Unknown);
LuaCsLogger.LogError("Error while executing timers... This shouldn't happen... Why do we a NRE here???", LuaCsMessageOrigin.Unknown);
LuaCsLogger.HandleException(e, LuaCsMessageOrigin.Unknown);
}
}