using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Globalization; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Xml.Linq; using System.Xml.Serialization; using Barotrauma.LuaCs; using Barotrauma.Steam; using OneOf; namespace Barotrauma.LuaCs.Data; #region ModConfigurationInfo public partial record ModConfigInfo : IModConfigInfo { public ContentPackage Package { get; init; } public ImmutableArray Assemblies { get; init; } public ImmutableArray LuaScripts { get; init; } public ImmutableArray Configs { get; init; } } #endregion #region DataContracts_Resources public record BaseResourceInfo : IBaseResourceInfo { public Platform SupportedPlatforms { get; init; } public Target SupportedTargets { get; init; } public int LoadPriority { get; init; } public ImmutableArray FilePaths { get; init; } public bool Optional { get; init; } public string InternalName { get; init; } public ContentPackage OwnerPackage { get; init; } public ImmutableArray RequiredPackages { get; init; } public ImmutableArray IncompatiblePackages { get; init; } } public record AssemblyResourceInfo : BaseResourceInfo, IAssemblyResourceInfo { public string FriendlyName { get; init; } public bool IsScript { get; init; } public bool UseInternalAccessName { get; init; } public bool IsReferenceModeOnly { get; init; } } /// /// Note: Config settings and settings-profiles are stored in the same files. /// public record ConfigResourceInfo : BaseResourceInfo, IConfigResourceInfo {} public record LuaScriptsResourceInfo : BaseResourceInfo, ILuaScriptResourceInfo { public bool IsAutorun { get; init; } public bool RunUnrestricted { get; init; } } #endregion #region DataContracts_ParsedInfo public record ConfigInfo : IConfigInfo { public string InternalName { get; init; } public ContentPackage OwnerPackage { get; init; } public string DataType { get; init; } public XElement Element { get; init; } public RunState EditableStates { get; init; } public NetSync NetSync { get; init; } #if CLIENT // IConfigDisplayInfo public string DisplayName { get; init; } public string Description { get; init; } public string DisplayCategory { get; init; } public bool ShowInMenus { get; init; } public string Tooltip { get; init; } public ContentPath ImageIconPath { get; init; } #endif } public record ConfigProfileInfo : IConfigProfileInfo { /// /// Profile name. /// public string InternalName { get; init; } public ContentPackage OwnerPackage { get; init; } public IReadOnlyList<(string SettingName, XElement Element)> ProfileValues { get; init; } } #endregion