[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:
@@ -544,7 +544,6 @@ namespace Barotrauma
|
||||
async Task LoadStaticAssetsAsync(IReadOnlyList<ContentPackage> packages)
|
||||
{
|
||||
var cfgRes = ImmutableArray<IConfigResourceInfo>.Empty;
|
||||
var cfpRes = ImmutableArray<IConfigProfileResourceInfo>.Empty;
|
||||
var luaRes = ImmutableArray<ILuaScriptResourceInfo>.Empty;
|
||||
|
||||
var tasksBuilder = ImmutableArray.CreateBuilder<Task>();
|
||||
@@ -561,15 +560,6 @@ namespace Barotrauma
|
||||
res.ToResult());
|
||||
})(),
|
||||
new Func<Task>(async () =>
|
||||
{
|
||||
var res = await PackageManagementService.GetConfigProfilesInfosAsync(packages);
|
||||
if (res.IsSuccess)
|
||||
cfpRes = res.Value.ConfigProfiles;
|
||||
if (res.Errors.Any())
|
||||
ThreadPool.QueueUserWorkItem(state => Logger.LogResults((FluentResults.Result)state),
|
||||
res.ToResult());
|
||||
})(),
|
||||
new Func<Task>(async () =>
|
||||
{
|
||||
var res = await PackageManagementService.GetLuaScriptsInfosAsync(packages);
|
||||
if (res.IsSuccess)
|
||||
@@ -588,9 +578,6 @@ namespace Barotrauma
|
||||
var res = await ConfigService.LoadConfigsAsync(cfgRes);
|
||||
if (res.Errors.Any())
|
||||
Logger.LogResults(res);
|
||||
res = await ConfigService.LoadConfigsProfilesAsync(cfpRes);
|
||||
if (res.Errors.Any())
|
||||
Logger.LogResults(res);
|
||||
})(),
|
||||
new Func<Task>(async () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user