[Save/Sync] In-Progress ModConfigXml loading rewrite.

+ Fixed async operations lock for Dispose() pattern in working files.
+ Rewrote StorageService.cs:
--- Now uses ContentPath instead of raw strings where possible.
--- Now throws exceptions for developer errors and critical program states.
+ Rewrote ModConfigService.cs:
--- All functions are now completely async.
+ Removed ConfigProfilesResources completely as they exist in common Config xml files.
+ Somewhat simplified package data and processes.
This commit is contained in:
MapleWheels
2026-01-08 11:35:34 -05:00
committed by Maplewheels
parent 42acb32c69
commit 3e81e27160
15 changed files with 651 additions and 347 deletions
@@ -20,7 +20,6 @@ public record ModConfigInfo : IModConfigInfo
public ImmutableArray<IAssemblyResourceInfo> Assemblies { get; init; }
public ImmutableArray<ILuaScriptResourceInfo> LuaScripts { get; init; }
public ImmutableArray<IConfigResourceInfo> Configs { get; init; }
public ImmutableArray<IConfigProfileResourceInfo> ConfigProfiles { get; init; }
}
#endregion
@@ -30,7 +29,6 @@ public record ModConfigInfo : IModConfigInfo
public record AssemblyResourcesInfo(ImmutableArray<IAssemblyResourceInfo> Assemblies) : IAssembliesResourcesInfo;
public record LuaScriptsResourcesInfo(ImmutableArray<ILuaScriptResourceInfo> LuaScripts) : ILuaScriptsResourcesInfo;
public record ConfigResourcesInfo(ImmutableArray<IConfigResourceInfo> Configs) : IConfigsResourcesInfo;
public record ConfigProfilesResourcesInfo(ImmutableArray<IConfigProfileResourceInfo> ConfigProfiles) : IConfigProfilesResourcesInfo;
public record BaseResourceInfo : IBaseResourceInfo
{
@@ -51,10 +49,11 @@ public record AssemblyResourceInfo : BaseResourceInfo, IAssemblyResourceInfo
public bool IsScript { get; init; }
}
/// <summary>
/// Note: Config settings and settings-profiles are stored in the same files.
/// </summary>
public record ConfigResourceInfo : BaseResourceInfo, IConfigResourceInfo {}
public record ConfigProfileResourceInfo : BaseResourceInfo, IConfigProfileResourceInfo {}
public record LuaScriptsResourceInfo : BaseResourceInfo, ILuaScriptResourceInfo
{
public bool IsAutorun { get; init; }