Sync daemon authority migration

This commit is contained in:
Meta Vens 2026-06-21 09:37:54 +01:00
commit 39a0dc8737
295 changed files with 25121 additions and 7360 deletions

View file

@ -0,0 +1,39 @@
using System.IO;
#nullable enable
namespace GameCult.Aetheria.State.Unity
{
public static class AetheriaRuntimeDaemonSoaViewStore
{
public static string GetViewPath(string stateFilePath)
{
return AetheriaRuntimeStateBoundary.GetDaemonSoaViewPath(stateFilePath);
}
public static string PublishView(string stateFilePath, AetheriaRuntimeDaemonSoaViewDocument view)
{
var path = GetViewPath(stateFilePath);
AetheriaRuntimeCultCacheDocumentStore.WriteDaemonSoaView(path, view);
return path;
}
public static bool TryReadView(string stateFilePath, out AetheriaRuntimeDaemonSoaViewDocument view)
{
var path = GetViewPath(stateFilePath);
if (!File.Exists(path))
{
view = new AetheriaRuntimeDaemonSoaViewDocument();
return false;
}
view = AetheriaRuntimeCultCacheDocumentStore.ReadDaemonSoaView(path);
return true;
}
public static AetheriaRuntimeDaemonSoaViewDocument ReadView(string stateFilePath)
{
return AetheriaRuntimeCultCacheDocumentStore.ReadDaemonSoaView(GetViewPath(stateFilePath));
}
}
}