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
|
|
@ -7327,8 +7327,8 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root)
|
|||
var requiredActionBarSymbols = new[]
|
||||
{
|
||||
"public abstract class ActionBarBinding : IDisposable",
|
||||
"AetheriaRuntimeCatalogSession _catalog",
|
||||
"Client.State.ObserveCatalog()",
|
||||
"CultMeshReactiveDocument<AetheriaRuntimeCatalogSnapshot> _catalog",
|
||||
"Client.State.ReactiveCatalog()",
|
||||
"_catalog?.Current?.FindItem(item, x => x.ItemKey)",
|
||||
"binding?.Dispose()",
|
||||
"private void OnDestroy()"
|
||||
|
|
@ -7343,11 +7343,11 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root)
|
|||
string.Join(", ", missingActionBarSymbols));
|
||||
}
|
||||
|
||||
if (actionBarSlot.Contains("CultMeshReactiveDocument<AetheriaRuntimeCatalogSnapshot> _catalog", StringComparison.Ordinal) ||
|
||||
actionBarSlot.Contains("Client.State.ReactiveCatalog()", StringComparison.Ordinal))
|
||||
if (actionBarSlot.Contains("AetheriaRuntimeCatalogSession _catalog", StringComparison.Ordinal) ||
|
||||
actionBarSlot.Contains("Client.State.ObserveCatalog()", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"ActionBarSlot still owns the raw catalog CultMesh document instead of AetheriaRuntimeCatalogSession.");
|
||||
"ActionBarSlot still routes through AetheriaRuntimeCatalogSession instead of its managed reactive typed catalog document.");
|
||||
}
|
||||
|
||||
var schematicDisplay = File.ReadAllText(Path.Combine(
|
||||
|
|
|
|||
|
|
@ -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