Route catalog reads through managed document

This commit is contained in:
Meta Vens 2026-06-28 01:58:58 +01:00
commit 03b1e082ea
15 changed files with 43 additions and 15 deletions

View file

@ -85,7 +85,7 @@ public abstract class ActionBarBinding
try
{
_catalog ??= Client.OpenRuntimeCatalog();
_catalog ??= Client.Aetheria().Catalog.Latest();
return _catalog?.FindItem(item.ItemKey);
}
catch (Exception ex)

View file

@ -35,7 +35,9 @@ public sealed class AetheriaUnityGameplayBootShell
}
var runtimeCatalog = AetheriaUnityRuntimeClientProvider.ResolveClient(stateBoot.StateFilePath, stateBoot.RuntimeId)
.OpenRuntimeCatalog();
.Aetheria()
.Catalog
.Latest();
if (runtimeCatalog == null)
throw new InvalidOperationException("Aetheria typed runtime catalog is required before gameplay boot.");

View file

@ -168,6 +168,7 @@ public class DaemonRuntimeDocumentTests
var currentEntity = client.Aetheria().Current.Entity.LatestAsync().GetAwaiter().GetResult();
var latestFrame = client.Aetheria().LatestFrame.LatestAsync().GetAwaiter().GetResult();
var catalog = client.Aetheria().Catalog.LatestAsync().GetAwaiter().GetResult();
var playerSettings = client.Aetheria().Settings.Player.LatestAsync().GetAwaiter().GetResult();
var verseHostSettings = client.Aetheria().Settings.VerseHost.LatestAsync().GetAwaiter().GetResult();
var currentEntityByType = client.Aetheria()
@ -217,6 +218,7 @@ public class DaemonRuntimeDocumentTests
Assert.AreEqual("aetheria.current.entity", client.State.Current.Entity.DocumentId);
Assert.AreSame(client.State.Current.Entity, client.State.Document<AetheriaRuntimeCurrentEntityDocument>());
Assert.AreSame(client.State.Catalog, client.Document<AetheriaRuntimeCatalogSnapshot>());
Assert.AreSame(client.State.ZoneRender, client.Document<AetheriaRuntimeZoneRenderDocument>());
Assert.AreSame(client.State.LatestFrame, client.Document<AetheriaRuntimeDaemonFrameDocument>());
Assert.AreSame(client.State.Settings.Player, client.Document<AetheriaRuntimePlayerSettingsDocument>());
@ -240,6 +242,8 @@ public class DaemonRuntimeDocumentTests
Assert.AreEqual(AetheriaRuntimeDaemonSchemas.Frame, latestFrame.Schema);
Assert.AreEqual(frame.FrameId, latestFrame.FrameId);
Assert.AreEqual(frame.FrameId, latestFrameByType.FrameId);
Assert.AreEqual(AetheriaRuntimeCatalogSnapshot.SchemaId, client.State.Catalog.Sources.Last().SchemaId);
Assert.GreaterOrEqual(catalog.Items.Count, 0);
Assert.AreEqual(AetheriaRuntimePlayerSettingsDocument.SchemaId, playerSettings.Schema);
Assert.AreEqual(AetheriaRuntimeVerseHostSettingsDocument.SchemaId, verseHostSettings.Schema);
Assert.AreEqual(AetheriaRuntimeDaemonSchemas.ObjectsViewport, objectsViewport.Schema);
@ -278,7 +282,10 @@ public class DaemonRuntimeDocumentTests
var player = client.Aetheria().Settings.Player.LatestAsync().GetAwaiter().GetResult();
var verseHost = client.Aetheria().Settings.VerseHost.LatestAsync().GetAwaiter().GetResult();
var catalog = client.Aetheria().Catalog.LatestAsync().GetAwaiter().GetResult();
Assert.AreEqual(AetheriaRuntimeCatalogSnapshot.SchemaId, client.State.Catalog.Sources.Last().SchemaId);
Assert.IsNotNull(catalog);
Assert.AreEqual(AetheriaRuntimePlayerSettingsDocument.SchemaId, player.Schema);
Assert.AreEqual(AetheriaRuntimeVerseHostSettingsDocument.SchemaId, verseHost.Schema);
Assert.AreEqual("", player.PlayerName);

View file

@ -329,7 +329,7 @@ public class SchematicDisplay : MonoBehaviour
try
{
_catalog = ResolveClient().OpenRuntimeCatalog();
_catalog = ResolveClient().Aetheria().Catalog.Latest();
}
catch (Exception ex)
{

View file

@ -226,7 +226,7 @@ public class MainMenu : MonoBehaviour
try
{
_catalog = ResolveClient(stateBoot).OpenRuntimeCatalog();
_catalog = ResolveClient(stateBoot).Aetheria().Catalog.Latest();
return _catalog;
}
catch (Exception ex)

View file

@ -1038,7 +1038,7 @@ public class InventoryMenu : MonoBehaviour
try
{
_catalog = ResolveClient().OpenRuntimeCatalog();
_catalog = ResolveClient().Aetheria().Catalog.Latest();
}
catch (Exception ex)
{

View file

@ -1530,7 +1530,7 @@ private void Update()
try
{
_catalog = ResolveClient().OpenRuntimeCatalog();
_catalog = ResolveClient().Aetheria().Catalog.Latest();
}
catch (Exception ex)
{

View file

@ -227,7 +227,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
try
{
_catalog = ResolveClient().OpenRuntimeCatalog();
_catalog = ResolveClient().Aetheria().Catalog.Latest();
}
catch (Exception ex)
{

View file

@ -650,7 +650,7 @@ public class TradeMenu : MonoBehaviour
try
{
_catalog = ResolveClient().OpenRuntimeCatalog();
_catalog = ResolveClient().Aetheria().Catalog.Latest();
}
catch (Exception ex)
{

View file

@ -1182,7 +1182,7 @@ public class ZoneRenderer : MonoBehaviour
try
{
_catalog = ResolveClient().OpenRuntimeCatalog();
_catalog = ResolveClient().Aetheria().Catalog.Latest();
}
catch (Exception ex)
{