public UserScriptRunner(CoreModules modules) { Lua = new Script(modules); Lua.Globals["RegisterHook"] = (Action <DynValue, string>)RegisterHook; Lua.Globals["RegisterCoroutine"] = (Action <DynValue, string, bool>)RegisterCoroutine; Lua.Globals["RemoveHook"] = (Action <string>)RemoveHook; GlobalScriptBindings.Initialize(Lua); }
public UserScriptRunner() { Lua = new Script(CoreModules.Preset_HardSandbox | CoreModules.Coroutine | CoreModules.OS_Time); Lua.Globals["RegisterHook"] = (Action <DynValue, string>)RegisterHook; Lua.Globals["RegisterCoroutine"] = (Action <DynValue, string, bool>)RegisterCoroutine; Lua.Globals["RemoveHook"] = (Action <string>)RemoveHook; GlobalScriptBindings.Initialize(Lua); }