Use reactive catalog document in action bar

This commit is contained in:
Meta Vens 2026-06-28 16:08:15 +01:00
commit 3e2264b1d2
2 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Linq;
using GameCult.Aetheria.State.Verse;
using GameCult.Mesh;
using TMPro;
using UniRx.Triggers;
using UnityEngine;
@ -57,7 +58,7 @@ public abstract class ActionBarBinding : IDisposable
protected AetheriaClient Client { get; }
protected ActionBarSlot Slot { get; }
protected GameSettings Settings { get; }
private AetheriaRuntimeCatalogSession _catalog;
private CultMeshReactiveDocument<AetheriaRuntimeCatalogSnapshot> _catalog;
public abstract void Activate();
public abstract void Deactivate();
public abstract void Update();
@ -94,7 +95,7 @@ public abstract class ActionBarBinding : IDisposable
try
{
_catalog ??= Client.State.ObserveCatalog();
_catalog ??= Client.State.ReactiveCatalog();
return _catalog?.Current?.FindItem(item, x => x.ItemKey);
}
catch (Exception ex)