Use reactive shared state in inventory panel

This commit is contained in:
Meta Vens 2026-06-28 09:04:28 +01:00
commit 570365f296
2 changed files with 45 additions and 10 deletions

View file

@ -7167,6 +7167,36 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root)
string.Join(", ", missingInventoryMenuSharedDocumentSymbols));
}
var inventoryPanel = File.ReadAllText(Path.Combine(
root,
"Assets",
"Scripts",
"UI",
"Menu",
"InventoryPanel.cs"));
var requiredInventoryPanelSharedDocumentSymbols = new[]
{
"CultMeshReactiveDocument<AetheriaRuntimeCatalogSnapshot> _catalog",
"CultMeshReactiveDocument<AetheriaRuntimePlayerSettingsDocument> _playerSettings",
"ResolveClient().Aetheria().ReactiveCatalog()",
".Settings",
".ReactivePlayer()",
"_catalog?.Dispose()",
"_playerSettings?.Dispose()",
"_catalog?.Current",
"_playerSettings?.Current",
"private void OnDestroy()"
};
var missingInventoryPanelSharedDocumentSymbols = requiredInventoryPanelSharedDocumentSymbols
.Where(symbol => !inventoryPanel.Contains(symbol, StringComparison.Ordinal))
.ToArray();
if (missingInventoryPanelSharedDocumentSymbols.Length > 0)
{
throw new InvalidOperationException(
"InventoryPanel should bind shared catalog/settings through managed reactive Aetheria documents with panel lifetime disposal: " +
string.Join(", ", missingInventoryPanelSharedDocumentSymbols));
}
var volumeCloudRenderer = File.ReadAllText(Path.Combine(
root,
"Assets",