Implemented a custom PlatformAccessor and re-added the rest of the io and os libraries

This commit is contained in:
EvilFactory
2023-05-01 13:24:18 -03:00
parent 29a2e07b1f
commit 8df9f7798e
3 changed files with 110 additions and 1 deletions
@@ -76,6 +76,8 @@ namespace Barotrauma
public LuaCsSetup()
{
Script.GlobalOptions.Platform = new LuaPlatformAccessor();
Hook = new LuaCsHook(this);
ModStore = new LuaCsModStore();
@@ -339,7 +341,7 @@ namespace Barotrauma
RegisterLuaConverters();
Lua = new Script(CoreModules.Preset_SoftSandbox | CoreModules.Debug);
Lua = new Script(CoreModules.Preset_SoftSandbox | CoreModules.Debug | CoreModules.IO | CoreModules.OS_System);
Lua.Options.DebugPrint = (o) => { LuaCsLogger.LogMessage(o); };
Lua.Options.ScriptLoader = LuaScriptLoader;
Lua.Options.CheckThreadAccess = false;