Expand typed player settings state

This commit is contained in:
Meta Vens 2026-06-13 10:29:12 +01:00
commit b621575a02
154 changed files with 333 additions and 169 deletions

View file

@ -43,6 +43,8 @@ var parsedNameFiles = entries.Concat(nameFileEntries)
.Select(entry => entry.NameFile!)
.ToArray();
ResetMaterializedStateOutput(statePath);
await using var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-legacy-catalog-import");
await node.PutLegacyCatalogQuarantineAsync(new AetheriaLegacyCatalogQuarantine
@ -155,6 +157,34 @@ static AetheriaLegacyCatalogFile CaptureFile(string root, string path)
};
}
static void ResetMaterializedStateOutput(string statePath)
{
DeleteFileIfExists(statePath);
DeleteDirectoryIfExists($"{statePath}.records");
var meshDirectory = Path.ChangeExtension(statePath, ".cultmesh");
if (!string.Equals(meshDirectory, statePath, StringComparison.OrdinalIgnoreCase))
{
DeleteDirectoryIfExists(meshDirectory);
}
}
static void DeleteFileIfExists(string path)
{
if (File.Exists(path))
{
File.Delete(path);
}
}
static void DeleteDirectoryIfExists(string path)
{
if (Directory.Exists(path))
{
Directory.Delete(path, recursive: true);
}
}
internal static class LegacyCatalogReader
{
private static readonly Dictionary<int, string> UnionNames = new()