Strip down the original logger class

This commit is contained in:
Evil Factory
2026-02-13 18:58:35 -03:00
parent 36471f2239
commit a36bd70505
7 changed files with 24 additions and 156 deletions
@@ -191,7 +191,7 @@ class LuaScriptManagementService : ILuaScriptManagementService, ILuaDataService
_script = new Script(CoreModules.Preset_SoftSandbox | CoreModules.Debug | CoreModules.IO | CoreModules.OS_System);
_script.Options.DebugPrint = (string msg) =>
{
_loggerService.Log(msg);
_loggerService.LogMessage($"[Lua] {msg}");
};
_script.Options.ScriptLoader = _luaScriptLoader;
_script.Options.CheckThreadAccess = false;
@@ -221,7 +221,7 @@ class LuaScriptManagementService : ILuaScriptManagementService, ILuaDataService
_script.Globals["loadfile"] = (Func<string, Table, string, DynValue>)LoadFile;
_script.Globals["require"] = (Func<string, Table, DynValue>)luaRequire.Require;
_script.Globals["printerror"] = (DynValue o) => { LuaCsLogger.LogError(o.ToString()); };
_script.Globals["printerror"] = (DynValue o) => { _loggerService.LogError($"[Lua] {o.ToString()}"); };
_script.Globals["dostring"] = (Func<string, Table, string, DynValue>)_script.DoString;
_script.Globals["load"] = (Func<string, Table, string, DynValue>)_script.LoadString;