Use reactive catalog document in action bar
This commit is contained in:
parent
9e4a17bb22
commit
3e2264b1d2
2 changed files with 8 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue