#nullable enable using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Reflection; using System.Threading.Tasks; using Barotrauma.LuaCs.Data; using FluentResults; using MoonSharp.Interpreter; using MoonSharp.Interpreter.Interop; namespace Barotrauma.LuaCs.Services; public interface ILuaScriptManagementService : IReusableService { #region Script_Ops object? GetGlobalTableValue(string tableName); /// /// Parses and loads script sources (code) into a memory cache without executing it. /// /// /// // [Required] Task LoadScriptResourcesAsync(ImmutableArray resourcesInfo); /// /// Executes already loaded into memory scripts data, in the supplied order. /// /// /// // [Required] FluentResults.Result ExecuteLoadedScripts(ImmutableArray executionOrder); /// /// /// /// /// // [Required] FluentResults.Result DisposePackageResources(ContentPackage package); /// /// Calls dispose on, and clears active refs for, currently running scripts. Does not clear caches. /// /// FluentResults.Result UnloadActiveScripts(); /// /// Unloads all scripts and clears all caches/references. /// /// /// May be functionally equivalent to FluentResults.Result DisposeAllPackageResources(); #endregion #region Type_Registration IUserDataDescriptor RegisterType(Type type); void UnregisterType(Type type); #endregion }