Name selected object handles by entity

This commit is contained in:
Meta Vens 2026-07-06 03:48:05 +01:00
commit e133ee2d52
2 changed files with 12 additions and 5 deletions

View file

@ -8808,7 +8808,7 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root
"public CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument> ZoneDetailsSurface(",
"public CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument> InventoryPanelSurface(",
"public CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument> InventoryDropdownSurface(",
"public CultMeshDocumentHandle<AetheriaRuntimeSelectedObjectDocument> SelectedObject(",
"public CultMeshDocumentHandle<AetheriaRuntimeSelectedObjectDocument> SelectedObject(int entityIndex)",
"public CultMeshDocumentHandle<AetheriaRuntimeInventoryDocument> Inventory(",
"public CultMeshDocumentHandle<AetheriaRuntimeStarbridgeScenarioDocument> StarbridgeScenario { get; }",
"public CultMeshDocumentHandle<AetheriaRuntimeStarbridgeSessionDocument> StarbridgeSession { get; }",
@ -8824,6 +8824,13 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root
"AetheriaClientState must expose managed document handles for remaining domain documents: " +
string.Join(", ", missingClientSymbols));
}
if (clientState.Contains("SelectedObject(int zoneIndex)", StringComparison.Ordinal) ||
clientState.Contains("_selectedObject(zoneIndex)", StringComparison.Ordinal) ||
clientState.Contains("Aetheria zone index must be non-negative.\";\r\n\r\n return _selectedObject", StringComparison.Ordinal))
{
throw new InvalidOperationException(
"Selected object documents are entity-indexed; AetheriaClientState must not expose a zone-indexed selected-object handle.");
}
var forbiddenFixedReactiveSymbols = new[]
{

View file

@ -270,12 +270,12 @@ namespace GameCult.Aetheria.State.Verse
return _mainMenuSurfaceDocument(surfaceId, canOpenRuntimeInputScreen, inGame);
}
public CultMeshDocumentHandle<AetheriaRuntimeSelectedObjectDocument> SelectedObject(int zoneIndex)
public CultMeshDocumentHandle<AetheriaRuntimeSelectedObjectDocument> SelectedObject(int entityIndex)
{
if (zoneIndex < 0)
throw new ArgumentOutOfRangeException(nameof(zoneIndex), zoneIndex, "Aetheria zone index must be non-negative.");
if (entityIndex < 0)
throw new ArgumentOutOfRangeException(nameof(entityIndex), entityIndex, "Aetheria entity index must be non-negative.");
return _selectedObject(zoneIndex);
return _selectedObject(entityIndex);
}
public CultMeshDocumentHandle<AetheriaRuntimeInventoryDocument> Inventory(int entityIndex)