2026-06-27 13:51:08 +01:00
|
|
|
using System;
|
2026-06-30 22:06:14 +01:00
|
|
|
using System.Collections.Generic;
|
2026-06-27 13:51:08 +01:00
|
|
|
using GameCult.Mesh;
|
2026-06-30 22:06:14 +01:00
|
|
|
using MessagePack;
|
2026-07-01 15:26:48 +01:00
|
|
|
using EveSurfaceDocument = GameCult.Eve.Surface.EveSurfaceDocument;
|
2026-06-27 13:51:08 +01:00
|
|
|
|
|
|
|
|
#nullable enable
|
|
|
|
|
|
|
|
|
|
namespace GameCult.Aetheria.State.Verse
|
|
|
|
|
{
|
2026-06-29 00:41:49 +01:00
|
|
|
public enum AetheriaClientEveSurface
|
|
|
|
|
{
|
|
|
|
|
Game,
|
|
|
|
|
GameTui,
|
|
|
|
|
Editor,
|
|
|
|
|
EditorTui
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-29 02:15:04 +01:00
|
|
|
public sealed class AetheriaClientState : IDisposable
|
2026-06-27 13:51:08 +01:00
|
|
|
{
|
2026-07-05 19:56:18 +01:00
|
|
|
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGameViewportDocument>> _mapViewport;
|
|
|
|
|
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeObjectsViewportDocument>> _objectsViewport;
|
|
|
|
|
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGravityViewportDocument>> _gravityViewport;
|
|
|
|
|
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeRenderSplatsViewportDocument>> _renderSplatsViewport;
|
2026-06-29 01:12:15 +01:00
|
|
|
private readonly Func<int, CultMeshDocumentHandle<AetheriaRuntimeZoneDetailsDocument>> _zoneDetails;
|
2026-06-30 19:14:49 +01:00
|
|
|
private readonly Func<int, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> _zoneDetailsSurface;
|
|
|
|
|
private readonly Func<AetheriaRuntimeInventoryPanelSurfaceRequest, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> _inventoryPanelSurface;
|
|
|
|
|
private readonly Func<AetheriaRuntimeInventoryDropdownSurfaceRequest, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> _inventoryDropdownSurface;
|
2026-07-05 16:59:06 +01:00
|
|
|
private readonly Func<string, bool, bool, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> _mainMenuSurfaceDocument;
|
2026-06-29 01:12:15 +01:00
|
|
|
private readonly Func<int, CultMeshDocumentHandle<AetheriaRuntimeSelectedObjectDocument>> _selectedObject;
|
|
|
|
|
private readonly Func<int, CultMeshDocumentHandle<AetheriaRuntimeInventoryDocument>> _inventory;
|
|
|
|
|
private readonly Func<string, CultMeshDocumentHandle<AetheriaRuntimeStarbridgePlayerSeatDocument>> _starbridgePlayerSeat;
|
2026-06-29 02:15:04 +01:00
|
|
|
private CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument>? _eveStateRefFrame;
|
|
|
|
|
private CultMeshReactiveDocument<AetheriaRuntimeDaemonHealthDocument>? _eveStateRefHealth;
|
|
|
|
|
private CultMeshReactiveDocument<AetheriaRuntimeDaemonCommandBoundaryDocument>? _eveStateRefCommandBoundary;
|
|
|
|
|
private CultMeshReactiveDocument<AetheriaRuntimeCatalogSnapshot>? _eveStateRefCatalog;
|
2026-06-27 14:11:30 +01:00
|
|
|
|
2026-06-27 13:51:08 +01:00
|
|
|
internal AetheriaClientState(
|
2026-06-28 02:19:55 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeDaemonProviderAdvertisementDocument> providerAdvertisement,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeDaemonHealthDocument> health,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeDaemonCommandBoundaryDocument> commandBoundary,
|
2026-07-09 22:22:03 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeAssetManifestDocument> assetManifest,
|
2026-06-28 03:30:16 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeVerseAuthorityPolicyDocument> authorityPolicy,
|
2026-06-29 04:21:43 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeDaemonFrameDocument> daemonFrame,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeDaemonSoaViewDocument> daemonSoaView,
|
2026-07-01 15:26:48 +01:00
|
|
|
CultMeshDocumentHandle<EveSurfaceDocument> gameSurface,
|
|
|
|
|
CultMeshDocumentHandle<EveSurfaceDocument> gameTuiSurface,
|
|
|
|
|
CultMeshDocumentHandle<EveSurfaceDocument> editorSurface,
|
|
|
|
|
CultMeshDocumentHandle<EveSurfaceDocument> editorTuiSurface,
|
2026-06-28 01:58:58 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeCatalogSnapshot> catalog,
|
2026-06-28 02:14:37 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeLoadoutTemplatesDocument> loadoutTemplates,
|
2026-06-28 01:46:18 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimePlayerSettingsDocument> playerSettings,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeVerseHostSettingsDocument> verseHostSettings,
|
2026-06-27 18:07:51 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeCurrentZoneDocument> currentZone,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeCurrentEntityDocument> currentEntity,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeCurrentDockingDocument> currentDocking,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeZoneContactsDocument> zoneContacts,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeStationRefitDocument> stationRefit,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeSectorMapDocument> sectorMap,
|
2026-06-28 01:32:22 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeZoneRenderDocument> zoneRender,
|
2026-07-05 19:56:18 +01:00
|
|
|
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGameViewportDocument>> mapViewport,
|
|
|
|
|
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeObjectsViewportDocument>> objectsViewport,
|
|
|
|
|
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGravityViewportDocument>> gravityViewport,
|
|
|
|
|
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeRenderSplatsViewportDocument>> renderSplatsViewport,
|
2026-06-28 01:37:43 +01:00
|
|
|
Func<int, CultMeshDocumentHandle<AetheriaRuntimeZoneDetailsDocument>> zoneDetails,
|
2026-06-30 19:14:49 +01:00
|
|
|
Func<int, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> zoneDetailsSurface,
|
|
|
|
|
Func<AetheriaRuntimeInventoryPanelSurfaceRequest, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> inventoryPanelSurface,
|
|
|
|
|
Func<AetheriaRuntimeInventoryDropdownSurfaceRequest, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> inventoryDropdownSurface,
|
2026-07-05 16:59:06 +01:00
|
|
|
Func<string, bool, bool, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> mainMenuSurfaceDocument,
|
2026-06-28 01:37:43 +01:00
|
|
|
Func<int, CultMeshDocumentHandle<AetheriaRuntimeSelectedObjectDocument>> selectedObject,
|
|
|
|
|
Func<int, CultMeshDocumentHandle<AetheriaRuntimeInventoryDocument>> inventory,
|
2026-06-28 01:32:22 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeStarbridgeScenarioDocument> starbridgeScenario,
|
|
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeStarbridgeSessionDocument> starbridgeSession,
|
2026-06-28 01:37:43 +01:00
|
|
|
CultMeshDocumentHandle<AetheriaRuntimeStarbridgeSessionSummaryDocument> starbridgeSummary,
|
2026-06-28 01:32:22 +01:00
|
|
|
Func<string, CultMeshDocumentHandle<AetheriaRuntimeStarbridgePlayerSeatDocument>> starbridgePlayerSeat)
|
2026-06-27 13:51:08 +01:00
|
|
|
{
|
2026-06-29 01:12:15 +01:00
|
|
|
ProviderAdvertisement = providerAdvertisement ?? throw new ArgumentNullException(nameof(providerAdvertisement));
|
|
|
|
|
Health = health ?? throw new ArgumentNullException(nameof(health));
|
|
|
|
|
CommandBoundary = commandBoundary ?? throw new ArgumentNullException(nameof(commandBoundary));
|
2026-07-09 22:22:03 +01:00
|
|
|
AssetManifest = assetManifest ?? throw new ArgumentNullException(nameof(assetManifest));
|
2026-06-29 01:12:15 +01:00
|
|
|
AuthorityPolicy = authorityPolicy ?? throw new ArgumentNullException(nameof(authorityPolicy));
|
2026-06-29 04:21:43 +01:00
|
|
|
DaemonFrame = daemonFrame ?? throw new ArgumentNullException(nameof(daemonFrame));
|
|
|
|
|
DaemonSoaView = daemonSoaView ?? throw new ArgumentNullException(nameof(daemonSoaView));
|
2026-06-29 01:12:15 +01:00
|
|
|
GameSurface = gameSurface ?? throw new ArgumentNullException(nameof(gameSurface));
|
|
|
|
|
GameTuiSurface = gameTuiSurface ?? throw new ArgumentNullException(nameof(gameTuiSurface));
|
|
|
|
|
EditorSurface = editorSurface ?? throw new ArgumentNullException(nameof(editorSurface));
|
|
|
|
|
EditorTuiSurface = editorTuiSurface ?? throw new ArgumentNullException(nameof(editorTuiSurface));
|
2026-06-28 01:58:58 +01:00
|
|
|
Catalog = catalog ?? throw new ArgumentNullException(nameof(catalog));
|
2026-06-28 02:14:37 +01:00
|
|
|
LoadoutTemplates = loadoutTemplates ?? throw new ArgumentNullException(nameof(loadoutTemplates));
|
2026-06-29 01:12:15 +01:00
|
|
|
PlayerSettings = playerSettings ?? throw new ArgumentNullException(nameof(playerSettings));
|
|
|
|
|
VerseHostSettings = verseHostSettings ?? throw new ArgumentNullException(nameof(verseHostSettings));
|
|
|
|
|
CurrentZone = currentZone ?? throw new ArgumentNullException(nameof(currentZone));
|
|
|
|
|
CurrentEntity = currentEntity ?? throw new ArgumentNullException(nameof(currentEntity));
|
2026-06-29 09:17:32 +01:00
|
|
|
CurrentDocking = currentDocking ?? throw new ArgumentNullException(nameof(currentDocking));
|
2026-06-27 13:51:08 +01:00
|
|
|
ZoneContacts = zoneContacts ?? throw new ArgumentNullException(nameof(zoneContacts));
|
|
|
|
|
StationRefit = stationRefit ?? throw new ArgumentNullException(nameof(stationRefit));
|
|
|
|
|
SectorMap = sectorMap ?? throw new ArgumentNullException(nameof(sectorMap));
|
|
|
|
|
ZoneRender = zoneRender ?? throw new ArgumentNullException(nameof(zoneRender));
|
2026-06-29 01:12:15 +01:00
|
|
|
_mapViewport = mapViewport ?? throw new ArgumentNullException(nameof(mapViewport));
|
|
|
|
|
_objectsViewport = objectsViewport ?? throw new ArgumentNullException(nameof(objectsViewport));
|
|
|
|
|
_gravityViewport = gravityViewport ?? throw new ArgumentNullException(nameof(gravityViewport));
|
|
|
|
|
_renderSplatsViewport = renderSplatsViewport ?? throw new ArgumentNullException(nameof(renderSplatsViewport));
|
|
|
|
|
_zoneDetails = zoneDetails ?? throw new ArgumentNullException(nameof(zoneDetails));
|
2026-06-30 19:14:49 +01:00
|
|
|
_zoneDetailsSurface = zoneDetailsSurface ?? throw new ArgumentNullException(nameof(zoneDetailsSurface));
|
|
|
|
|
_inventoryPanelSurface = inventoryPanelSurface ?? throw new ArgumentNullException(nameof(inventoryPanelSurface));
|
|
|
|
|
_inventoryDropdownSurface = inventoryDropdownSurface ?? throw new ArgumentNullException(nameof(inventoryDropdownSurface));
|
2026-07-05 16:59:06 +01:00
|
|
|
_mainMenuSurfaceDocument = mainMenuSurfaceDocument ?? throw new ArgumentNullException(nameof(mainMenuSurfaceDocument));
|
2026-06-29 01:12:15 +01:00
|
|
|
_selectedObject = selectedObject ?? throw new ArgumentNullException(nameof(selectedObject));
|
|
|
|
|
_inventory = inventory ?? throw new ArgumentNullException(nameof(inventory));
|
|
|
|
|
StarbridgeScenario = starbridgeScenario ?? throw new ArgumentNullException(nameof(starbridgeScenario));
|
|
|
|
|
StarbridgeSession = starbridgeSession ?? throw new ArgumentNullException(nameof(starbridgeSession));
|
|
|
|
|
StarbridgeSummary = starbridgeSummary ?? throw new ArgumentNullException(nameof(starbridgeSummary));
|
|
|
|
|
_starbridgePlayerSeat = starbridgePlayerSeat ?? throw new ArgumentNullException(nameof(starbridgePlayerSeat));
|
2026-06-27 13:51:08 +01:00
|
|
|
}
|
|
|
|
|
|
2026-06-29 01:12:15 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeDaemonProviderAdvertisementDocument> ProviderAdvertisement { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeDaemonHealthDocument> Health { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeDaemonCommandBoundaryDocument> CommandBoundary { get; }
|
|
|
|
|
|
2026-07-09 22:22:03 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeAssetManifestDocument> AssetManifest { get; }
|
|
|
|
|
|
2026-06-29 01:12:15 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeVerseAuthorityPolicyDocument> AuthorityPolicy { get; }
|
2026-06-28 02:19:55 +01:00
|
|
|
|
2026-06-29 04:21:43 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeDaemonFrameDocument> DaemonFrame { get; }
|
2026-06-28 01:32:22 +01:00
|
|
|
|
2026-06-29 04:21:43 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeDaemonSoaViewDocument> DaemonSoaView { get; }
|
2026-06-28 01:32:22 +01:00
|
|
|
|
2026-06-28 01:58:58 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeCatalogSnapshot> Catalog { get; }
|
|
|
|
|
|
2026-06-28 02:14:37 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeLoadoutTemplatesDocument> LoadoutTemplates { get; }
|
|
|
|
|
|
2026-07-01 15:26:48 +01:00
|
|
|
public CultMeshDocumentHandle<EveSurfaceDocument> GameSurface { get; }
|
2026-06-29 01:12:15 +01:00
|
|
|
|
2026-07-01 15:26:48 +01:00
|
|
|
public CultMeshDocumentHandle<EveSurfaceDocument> GameTuiSurface { get; }
|
2026-06-29 01:12:15 +01:00
|
|
|
|
2026-07-01 15:26:48 +01:00
|
|
|
public CultMeshDocumentHandle<EveSurfaceDocument> EditorSurface { get; }
|
2026-06-29 01:12:15 +01:00
|
|
|
|
2026-07-01 15:26:48 +01:00
|
|
|
public CultMeshDocumentHandle<EveSurfaceDocument> EditorTuiSurface { get; }
|
2026-06-29 01:12:15 +01:00
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimePlayerSettingsDocument> PlayerSettings { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeVerseHostSettingsDocument> VerseHostSettings { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeCurrentZoneDocument> CurrentZone { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeCurrentEntityDocument> CurrentEntity { get; }
|
2026-06-28 01:46:18 +01:00
|
|
|
|
2026-06-29 09:17:32 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeCurrentDockingDocument> CurrentDocking { get; }
|
2026-06-27 13:51:08 +01:00
|
|
|
|
2026-06-29 01:12:15 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeStarbridgeScenarioDocument> StarbridgeScenario { get; }
|
2026-06-28 01:37:43 +01:00
|
|
|
|
2026-06-29 08:06:19 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeStarbridgeSessionDocument> StarbridgeSession { get; }
|
2026-06-27 14:11:30 +01:00
|
|
|
|
2026-06-29 08:06:19 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeStarbridgeSessionSummaryDocument> StarbridgeSummary { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeZoneContactsDocument> ZoneContacts { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeStationRefitDocument> StationRefit { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeSectorMapDocument> SectorMap { get; }
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeZoneRenderDocument> ZoneRender { get; }
|
|
|
|
|
|
2026-06-29 07:09:34 +01:00
|
|
|
public static bool TryResolveEveSurface(
|
|
|
|
|
string? surfaceId,
|
|
|
|
|
out AetheriaClientEveSurface surface)
|
|
|
|
|
{
|
|
|
|
|
if (string.Equals(surfaceId, AetheriaRuntimeDaemonGameSurfaceBuilder.SurfaceId, StringComparison.Ordinal))
|
|
|
|
|
{
|
|
|
|
|
surface = AetheriaClientEveSurface.Game;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.Equals(surfaceId, AetheriaRuntimeDaemonGameSurfaceBuilder.TuiSurfaceId, StringComparison.Ordinal))
|
|
|
|
|
{
|
|
|
|
|
surface = AetheriaClientEveSurface.GameTui;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.Equals(surfaceId, AetheriaRuntimeDaemonEditorSurfaceBuilder.SurfaceId, StringComparison.Ordinal))
|
|
|
|
|
{
|
|
|
|
|
surface = AetheriaClientEveSurface.Editor;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.Equals(surfaceId, AetheriaRuntimeDaemonEditorSurfaceBuilder.TuiSurfaceId, StringComparison.Ordinal))
|
|
|
|
|
{
|
|
|
|
|
surface = AetheriaClientEveSurface.EditorTui;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
surface = default;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-01 15:26:48 +01:00
|
|
|
public CultMeshDocumentHandle<EveSurfaceDocument>? EveSurfaceDocument(
|
2026-06-29 07:09:34 +01:00
|
|
|
string? surfaceId)
|
|
|
|
|
{
|
2026-06-29 08:06:19 +01:00
|
|
|
if (!TryResolveEveSurface(surfaceId, out var surface))
|
|
|
|
|
return null;
|
2026-06-28 02:25:48 +01:00
|
|
|
|
2026-06-29 08:06:19 +01:00
|
|
|
return surface switch
|
2026-06-29 00:41:49 +01:00
|
|
|
{
|
2026-06-29 01:12:15 +01:00
|
|
|
AetheriaClientEveSurface.Game => GameSurface,
|
|
|
|
|
AetheriaClientEveSurface.GameTui => GameTuiSurface,
|
|
|
|
|
AetheriaClientEveSurface.Editor => EditorSurface,
|
|
|
|
|
AetheriaClientEveSurface.EditorTui => EditorTuiSurface,
|
|
|
|
|
_ => throw new ArgumentOutOfRangeException(nameof(surface), surface, null)
|
|
|
|
|
};
|
2026-06-28 10:18:30 +01:00
|
|
|
}
|
|
|
|
|
|
2026-07-05 19:56:18 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeGameViewportDocument> GameViewport(
|
|
|
|
|
AetheriaRuntimeViewportBounds viewport)
|
2026-06-29 07:51:45 +01:00
|
|
|
{
|
2026-07-05 19:56:18 +01:00
|
|
|
return _mapViewport(viewport ?? new AetheriaRuntimeViewportBounds());
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeObjectsViewportDocument> ObjectsViewport(
|
2026-07-05 19:56:18 +01:00
|
|
|
AetheriaRuntimeViewportBounds viewport)
|
2026-06-29 07:51:45 +01:00
|
|
|
{
|
2026-07-05 19:56:18 +01:00
|
|
|
return _objectsViewport(viewport ?? new AetheriaRuntimeViewportBounds());
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeGravityViewportDocument> GravityViewport(
|
2026-07-05 19:56:18 +01:00
|
|
|
AetheriaRuntimeViewportBounds viewport)
|
2026-06-29 07:51:45 +01:00
|
|
|
{
|
2026-07-05 19:56:18 +01:00
|
|
|
return _gravityViewport(viewport ?? new AetheriaRuntimeViewportBounds());
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeRenderSplatsViewportDocument> RenderSplatsViewport(
|
2026-07-05 19:56:18 +01:00
|
|
|
AetheriaRuntimeViewportBounds viewport)
|
2026-06-29 07:51:45 +01:00
|
|
|
{
|
2026-07-05 19:56:18 +01:00
|
|
|
return _renderSplatsViewport(viewport ?? new AetheriaRuntimeViewportBounds());
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
2026-06-30 19:14:49 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeZoneDetailsDocument> ZoneDetails(int zoneIndex)
|
2026-06-29 09:43:35 +01:00
|
|
|
{
|
2026-06-30 19:14:49 +01:00
|
|
|
if (zoneIndex < 0)
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(zoneIndex), zoneIndex, "Aetheria zone index must be non-negative.");
|
2026-06-29 09:43:35 +01:00
|
|
|
|
2026-06-30 19:14:49 +01:00
|
|
|
return _zoneDetails(zoneIndex);
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
2026-06-30 19:14:49 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument> ZoneDetailsSurface(int zoneIndex)
|
2026-06-29 07:51:45 +01:00
|
|
|
{
|
|
|
|
|
if (zoneIndex < 0)
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(zoneIndex), zoneIndex, "Aetheria zone index must be non-negative.");
|
|
|
|
|
|
2026-06-30 19:14:49 +01:00
|
|
|
return _zoneDetailsSurface(zoneIndex);
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
2026-06-30 19:14:49 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument> InventoryPanelSurface(
|
|
|
|
|
AetheriaRuntimeInventoryPanelSurfaceRequest request)
|
2026-06-29 09:43:35 +01:00
|
|
|
{
|
2026-06-30 19:14:49 +01:00
|
|
|
return _inventoryPanelSurface(request ?? new AetheriaRuntimeInventoryPanelSurfaceRequest());
|
2026-06-29 09:43:35 +01:00
|
|
|
}
|
|
|
|
|
|
2026-06-30 19:14:49 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument> InventoryDropdownSurface(
|
|
|
|
|
AetheriaRuntimeInventoryDropdownSurfaceRequest request)
|
2026-06-29 07:51:45 +01:00
|
|
|
{
|
2026-06-30 19:14:49 +01:00
|
|
|
return _inventoryDropdownSurface(request ?? new AetheriaRuntimeInventoryDropdownSurfaceRequest());
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
2026-06-30 23:15:57 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument> MainMenuSurface(
|
|
|
|
|
string surfaceId,
|
|
|
|
|
bool canOpenRuntimeInputScreen,
|
|
|
|
|
bool inGame)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(surfaceId))
|
|
|
|
|
throw new ArgumentException("Main menu surface id must be non-empty.", nameof(surfaceId));
|
|
|
|
|
|
2026-07-05 16:59:06 +01:00
|
|
|
return _mainMenuSurfaceDocument(surfaceId, canOpenRuntimeInputScreen, inGame);
|
2026-06-30 23:15:57 +01:00
|
|
|
}
|
|
|
|
|
|
2026-07-06 03:48:05 +01:00
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeSelectedObjectDocument> SelectedObject(int entityIndex)
|
2026-06-29 07:51:45 +01:00
|
|
|
{
|
2026-07-06 03:48:05 +01:00
|
|
|
if (entityIndex < 0)
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(entityIndex), entityIndex, "Aetheria entity index must be non-negative.");
|
2026-06-29 07:51:45 +01:00
|
|
|
|
2026-07-06 03:48:05 +01:00
|
|
|
return _selectedObject(entityIndex);
|
2026-06-29 07:51:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeInventoryDocument> Inventory(int entityIndex)
|
|
|
|
|
{
|
|
|
|
|
if (entityIndex < 0)
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(entityIndex), entityIndex, "Aetheria entity index must be non-negative.");
|
|
|
|
|
|
|
|
|
|
return _inventory(entityIndex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CultMeshDocumentHandle<AetheriaRuntimeStarbridgePlayerSeatDocument> StarbridgePlayerSeat(string seatId)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(seatId))
|
|
|
|
|
throw new ArgumentException("Seat id must be non-empty.", nameof(seatId));
|
|
|
|
|
|
|
|
|
|
return _starbridgePlayerSeat(seatId);
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-29 01:12:15 +01:00
|
|
|
public CultMeshStateRefResolver CreateEveSurfaceCultMeshStateRefResolver()
|
|
|
|
|
{
|
|
|
|
|
return AetheriaRuntimeStateRefResolver.CreateEveSurfaceCultMeshStateRefResolver(
|
2026-06-30 22:06:14 +01:00
|
|
|
() => ReadOptionalReactive(ref _eveStateRefFrame, DaemonFrame),
|
|
|
|
|
() => ReadOptionalReactive(ref _eveStateRefHealth, Health),
|
|
|
|
|
() => ReadOptionalReactive(ref _eveStateRefCommandBoundary, CommandBoundary),
|
|
|
|
|
() => ReadOptionalReactive(ref _eveStateRefCatalog, Catalog));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static TDocument? ReadOptionalReactive<TDocument>(
|
|
|
|
|
ref CultMeshReactiveDocument<TDocument>? reactive,
|
|
|
|
|
CultMeshDocumentHandle<TDocument> handle)
|
|
|
|
|
where TDocument : class
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
reactive ??= handle.Reactive();
|
|
|
|
|
return reactive.Current;
|
|
|
|
|
}
|
|
|
|
|
catch (KeyNotFoundException)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
catch (FormatterNotRegisteredException)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2026-06-29 02:15:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
|
|
|
|
_eveStateRefFrame?.Dispose();
|
|
|
|
|
_eveStateRefHealth?.Dispose();
|
|
|
|
|
_eveStateRefCommandBoundary?.Dispose();
|
|
|
|
|
_eveStateRefCatalog?.Dispose();
|
|
|
|
|
_eveStateRefFrame = null;
|
|
|
|
|
_eveStateRefHealth = null;
|
|
|
|
|
_eveStateRefCommandBoundary = null;
|
|
|
|
|
_eveStateRefCatalog = null;
|
2026-06-29 01:12:15 +01:00
|
|
|
}
|
2026-06-28 01:32:22 +01:00
|
|
|
}
|
2026-06-29 01:12:15 +01:00
|
|
|
|
2026-06-27 13:51:08 +01:00
|
|
|
}
|