Use generic reactive daemon documents

This commit is contained in:
Meta Vens 2026-06-28 23:41:03 +01:00
commit 0e694abe9a
7 changed files with 54 additions and 81 deletions

View file

@ -131,17 +131,18 @@ public sealed class AetheriaDaemonObserver : MonoBehaviour
return;
}
_daemonFrame ??= state.ReactiveDaemonFrame();
_daemonSoaView ??= TryReactiveDaemonSoaView(state);
_zoneRender ??= state.ReactiveZoneRender();
_daemonFrame ??= state.Reactive<AetheriaRuntimeDaemonFrameDocument>();
_daemonSoaView ??= TryReactive<AetheriaRuntimeDaemonSoaViewDocument>(state);
_zoneRender ??= state.Reactive<AetheriaRuntimeZoneRenderDocument>();
}
private static CultMeshReactiveDocument<AetheriaRuntimeDaemonSoaViewDocument> TryReactiveDaemonSoaView(
private static CultMeshReactiveDocument<TDocument> TryReactive<TDocument>(
AetheriaClientState state)
where TDocument : class
{
try
{
return state.ReactiveDaemonSoaView();
return state.Reactive<TDocument>();
}
catch (System.Collections.Generic.KeyNotFoundException)
{