mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 14:32:56 +00:00
Load some default Lua libraries
This commit is contained in:
parent
a87cd41d7b
commit
abeee2408f
@ -1,4 +1,5 @@
|
|||||||
using Lua;
|
using Lua;
|
||||||
|
using Lua.Standard;
|
||||||
|
|
||||||
// ReSharper disable MemberCanBePrivate.Global
|
// ReSharper disable MemberCanBePrivate.Global
|
||||||
namespace AIStudio.Tools.PluginSystem;
|
namespace AIStudio.Tools.PluginSystem;
|
||||||
@ -85,6 +86,14 @@ public abstract class PluginBase
|
|||||||
// For security reasons, we don't want to allow the plugin to load modules:
|
// For security reasons, we don't want to allow the plugin to load modules:
|
||||||
this.state.ModuleLoader = new NoModuleLoader();
|
this.state.ModuleLoader = new NoModuleLoader();
|
||||||
|
|
||||||
|
// Add some useful libraries:
|
||||||
|
this.state.OpenModuleLibrary();
|
||||||
|
this.state.OpenStringLibrary();
|
||||||
|
this.state.OpenTableLibrary();
|
||||||
|
this.state.OpenMathLibrary();
|
||||||
|
this.state.OpenBitwiseLibrary();
|
||||||
|
this.state.OpenCoroutineLibrary();
|
||||||
|
|
||||||
var issues = new List<string>();
|
var issues = new List<string>();
|
||||||
if(!string.IsNullOrWhiteSpace(parseError))
|
if(!string.IsNullOrWhiteSpace(parseError))
|
||||||
issues.Add(parseError);
|
issues.Add(parseError);
|
||||||
|
Loading…
Reference in New Issue
Block a user