2596 lines
70 KiB
TypeScript
2596 lines
70 KiB
TypeScript
// <auto-generated />
|
|
// Generated by scripts/generate-rts-bindings.mjs from Aetheria C# MessagePack documents.
|
|
|
|
import { CultMesh } from "cultmesh-ts";
|
|
import type { CultMeshLiveFeedDiagnostic, CultMeshOperationContext, CultMeshOperationReceipt, CultMeshQuerySource, CultMeshQueryContext, CultMeshQuerySurfaceDiagnostic, CultMeshQueryWatcher, CultMeshRouteHint, CultMeshSurfaceCatalogDiagnostic, CultMeshSurfaceCatalogIndexDiagnostic, CultMeshUnsubscribe, CultMeshVerseContext, CultMeshViewportRequest } from "cultmesh-ts";
|
|
import type { IpcMain } from "electron";
|
|
|
|
export const AetheriaRtsSchemas = {
|
|
daemonCommand: "gamecult.aetheria.daemon_command.v1",
|
|
eveCommand: "gamecult.eve.command.v1",
|
|
daemonFrame: "gamecult.aetheria.daemon_frame.v1",
|
|
daemonHealth: "gamecult.aetheria.daemon_health.v1",
|
|
assetManifest: "gamecult.aetheria.asset_manifest.v1",
|
|
gameViewport: "gamecult.aetheria.game_viewport.v1",
|
|
objectsViewport: "gamecult.fields.objects.v1",
|
|
gravityViewport: "gamecult.fields.gravity.v1",
|
|
renderSplatsViewport: "gamecult.fields.splats.v1",
|
|
currentZone: "gamecult.aetheria.current_zone.v1",
|
|
currentEntity: "gamecult.aetheria.current_entity.v1",
|
|
currentDocking: "gamecult.aetheria.current_docking.v1",
|
|
stationRefit: "gamecult.aetheria.station_refit.v1",
|
|
sectorMap: "gamecult.aetheria.sector_map.v1",
|
|
zoneRender: "gamecult.aetheria.zone_render.v1",
|
|
selectedObject: "gamecult.aetheria.selected_object.v1",
|
|
inventory: "gamecult.aetheria.inventory.v1",
|
|
starbridgeScenario: "gamecult.aetheria.starbridge_scenario.v1",
|
|
starbridgeSession: "gamecult.aetheria.starbridge_session.v1",
|
|
starbridgeSessionSummary: "gamecult.aetheria.starbridge_session_summary.v1",
|
|
verseAuthorityPolicy: "gamecult.aetheria.verse_authority_policy.v1",
|
|
authorityLease: "gamecult.aetheria.authority_lease.v1",
|
|
} as const;
|
|
|
|
export const AetheriaRuntimeDaemonCommandKinds = {
|
|
none: 0,
|
|
ping: 1,
|
|
setTarget: 2,
|
|
clearTarget: 3,
|
|
targetNearest: 4,
|
|
targetNext: 5,
|
|
targetPrevious: 6,
|
|
targetReticle: 7,
|
|
setMoveVector: 8,
|
|
setLookDirection: 9,
|
|
setTractorPower: 10,
|
|
fireWeaponGroup: 11,
|
|
setWeaponGroupActive: 12,
|
|
setWeaponGroupMembership: 13,
|
|
setBehaviorActive: 14,
|
|
activateConsumable: 15,
|
|
sensorPing: 16,
|
|
setItemEnabled: 17,
|
|
setItemOverrideShutdown: 18,
|
|
setThermotoggleTargetTemperature: 19,
|
|
pickUpLoot: 20,
|
|
restoreLoadout: 21,
|
|
dock: 22,
|
|
dockNearest: 23,
|
|
undock: 24,
|
|
interact: 25,
|
|
setDockedCurrentShip: 26,
|
|
towToStation: 27,
|
|
enterWormhole: 28,
|
|
tradePurchase: 29,
|
|
transferCargoItem: 30,
|
|
equipItem: 31,
|
|
storeItem: 32,
|
|
toggleHullConductivity: 33,
|
|
setEntityName: 34,
|
|
destroyEntity: 35,
|
|
setOverrideShutdown: 36,
|
|
setHeatsinksEnabled: 37,
|
|
setShutdownPerformance: 38,
|
|
toggleShieldEnabled: 39,
|
|
issueAgentTask: 40,
|
|
cancelAgentTask: 41,
|
|
} as const;
|
|
|
|
export const AetheriaRuntimeEveCommandKinds = {
|
|
unknown: 0,
|
|
catalogRefresh: 1,
|
|
operationsRefresh: 2,
|
|
playerSettingsRefresh: 3,
|
|
setPlayerName: 4,
|
|
cycleTemperatureUnit: 5,
|
|
decrementSignificantDigits: 6,
|
|
incrementSignificantDigits: 7,
|
|
cycleNebulaQuality: 8,
|
|
toggleShowAsteroidsInMinimap: 9,
|
|
inputSettingsRefresh: 10,
|
|
beginInputCapture: 11,
|
|
cancelInputCapture: 12,
|
|
setBindingOverride: 13,
|
|
toggleActionBar: 14,
|
|
setActionBarEnabled: 15,
|
|
saveLoadoutTemplate: 16,
|
|
verseHostRefresh: 17,
|
|
cycleVerseHostVisibility: 18,
|
|
tradeValuePolicyRefresh: 19,
|
|
setTradeValueQualityMinimum: 20,
|
|
setTradeValueQualityMaximum: 21,
|
|
setTradeValueQualityExponent: 22,
|
|
setTradeValueTierQuality: 23,
|
|
mainMenuContinueRun: 24,
|
|
mainMenuNewGame: 25,
|
|
mainMenuShowSettings: 26,
|
|
mainMenuQuit: 27,
|
|
mainMenuShowPlayerSettings: 28,
|
|
mainMenuShowVerseSettings: 29,
|
|
mainMenuShowInputSettings: 30,
|
|
mainMenuBackToMain: 31,
|
|
mainMenuBackToSettings: 32,
|
|
mainMenuOpenRuntimeInputScreen: 33,
|
|
} as const;
|
|
|
|
export const AetheriaRtsIpcChannels = {
|
|
mapViewport: "aetheria-rts:map-viewport",
|
|
objectsViewport: "aetheria-rts:objects-viewport",
|
|
gravityViewport: "aetheria-rts:gravity-viewport",
|
|
renderSplatsViewport: "aetheria-rts:render-splats-viewport",
|
|
viewportFeed: "aetheria-rts:viewport-feed",
|
|
viewportFeedStop: "aetheria-rts:viewport-feed-stop",
|
|
viewportFeedUpdate: "aetheria-rts:viewport-feed-update",
|
|
selectedObject: "aetheria-rts:selected-object",
|
|
inventory: "aetheria-rts:inventory",
|
|
daemonHealth: "aetheria-rts:daemon-health",
|
|
authorityStatus: "aetheria-rts:authority-status",
|
|
starbridgeSession: "aetheria-rts:starbridge-session",
|
|
assetManifest: "aetheria-rts:asset-manifest",
|
|
setMoveVector: "aetheria-rts:set-move-vector",
|
|
setTarget: "aetheria-rts:set-target",
|
|
surfaceCatalog: "aetheria-rts:surface-catalog",
|
|
surfaceCatalogIndex: "aetheria-rts:surface-catalog-index",
|
|
eveSurface: "eve:surface",
|
|
eveProviderAdvertisement: "eve:provider-advertisement",
|
|
eveDocument: "eve:embedded-document",
|
|
submitEveCommand: "eve:submit-command",
|
|
windowControl: "eve-electron:window-control",
|
|
health: "aetheria-rts:health",
|
|
} as const;
|
|
|
|
export type AetheriaRuntimeDaemonCommandDocumentSlot =
|
|
| "schema"
|
|
| "commandId"
|
|
| "clientId"
|
|
| "issuedAtUtc"
|
|
| "sessionId"
|
|
| "observedFrameId"
|
|
| "kind"
|
|
| "actorEntityKey"
|
|
| "targetEntityKey"
|
|
| "targetZoneIndex"
|
|
| "equipmentIndex"
|
|
| "behaviorIndex"
|
|
| "weaponGroup"
|
|
| "positionX"
|
|
| "positionY"
|
|
| "positionZ"
|
|
| "directionX"
|
|
| "directionY"
|
|
| "scalarValue"
|
|
| "textValue"
|
|
| "cargoTransfer"
|
|
| "tradePurchase"
|
|
| "lootPickup"
|
|
| "loadoutRestore"
|
|
| "equipmentTransfer"
|
|
| "storeItem"
|
|
| "authorRuntimeId"
|
|
| "subjectKey"
|
|
| "claimKind"
|
|
| "agentTask";
|
|
|
|
export const aetheriaRuntimeDaemonCommandDocumentSlots: Record<AetheriaRuntimeDaemonCommandDocumentSlot, number> = {
|
|
schema: 0,
|
|
commandId: 1,
|
|
clientId: 2,
|
|
issuedAtUtc: 3,
|
|
sessionId: 4,
|
|
observedFrameId: 5,
|
|
kind: 6,
|
|
actorEntityKey: 7,
|
|
targetEntityKey: 8,
|
|
targetZoneIndex: 9,
|
|
equipmentIndex: 10,
|
|
behaviorIndex: 11,
|
|
weaponGroup: 12,
|
|
positionX: 13,
|
|
positionY: 14,
|
|
positionZ: 15,
|
|
directionX: 16,
|
|
directionY: 17,
|
|
scalarValue: 18,
|
|
textValue: 19,
|
|
cargoTransfer: 21,
|
|
tradePurchase: 22,
|
|
lootPickup: 23,
|
|
loadoutRestore: 24,
|
|
equipmentTransfer: 25,
|
|
storeItem: 26,
|
|
authorRuntimeId: 27,
|
|
subjectKey: 28,
|
|
claimKind: 29,
|
|
agentTask: 30,
|
|
};
|
|
|
|
export type AetheriaRuntimeEveCommandDocumentSlot =
|
|
| "schema"
|
|
| "commandId"
|
|
| "providerId"
|
|
| "surfaceId"
|
|
| "command"
|
|
| "issuedAtUtc"
|
|
| "clientId"
|
|
| "playerSettings"
|
|
| "loadoutTemplate"
|
|
| "inputSettings"
|
|
| "tradeValuePolicy"
|
|
| "payload"
|
|
| "operation";
|
|
|
|
export const aetheriaRuntimeEveCommandDocumentSlots: Record<AetheriaRuntimeEveCommandDocumentSlot, number> = {
|
|
schema: 0,
|
|
commandId: 1,
|
|
providerId: 2,
|
|
surfaceId: 3,
|
|
command: 4,
|
|
issuedAtUtc: 5,
|
|
clientId: 6,
|
|
playerSettings: 7,
|
|
loadoutTemplate: 8,
|
|
inputSettings: 9,
|
|
tradeValuePolicy: 10,
|
|
payload: 16,
|
|
operation: 17,
|
|
};
|
|
|
|
export type AetheriaRuntimeDaemonFrameDocumentSlot =
|
|
| "schema"
|
|
| "daemonId"
|
|
| "sessionId"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "fixedDeltaSeconds"
|
|
| "isAuthoritative"
|
|
| "stateSource"
|
|
| "run"
|
|
| "capabilities"
|
|
| "appliedCommandIds"
|
|
| "rejectedCommandIds"
|
|
| "accountedCommandIds"
|
|
| "cumulativeAppliedCommandIds"
|
|
| "cumulativeRejectedCommandIds"
|
|
| "importedFactIds"
|
|
| "rejectedImportedFactIds"
|
|
| "duplicateImportedFactIds"
|
|
| "cumulativeImportedFactIds"
|
|
| "cumulativeRejectedImportedFactIds"
|
|
| "renderSettings"
|
|
| "simulationSettings";
|
|
|
|
export const aetheriaRuntimeDaemonFrameDocumentSlots: Record<AetheriaRuntimeDaemonFrameDocumentSlot, number> = {
|
|
schema: 0,
|
|
daemonId: 1,
|
|
sessionId: 2,
|
|
frameId: 3,
|
|
publishedAtUtc: 4,
|
|
simulationTimeSeconds: 5,
|
|
fixedDeltaSeconds: 6,
|
|
isAuthoritative: 7,
|
|
stateSource: 8,
|
|
run: 9,
|
|
capabilities: 10,
|
|
appliedCommandIds: 11,
|
|
rejectedCommandIds: 12,
|
|
accountedCommandIds: 13,
|
|
cumulativeAppliedCommandIds: 14,
|
|
cumulativeRejectedCommandIds: 15,
|
|
importedFactIds: 16,
|
|
rejectedImportedFactIds: 17,
|
|
duplicateImportedFactIds: 18,
|
|
cumulativeImportedFactIds: 19,
|
|
cumulativeRejectedImportedFactIds: 20,
|
|
renderSettings: 21,
|
|
simulationSettings: 22,
|
|
};
|
|
|
|
export type AetheriaRuntimeDaemonHealthDocumentSlot =
|
|
| "schema"
|
|
| "daemonId"
|
|
| "verseId"
|
|
| "publishedAtUtc"
|
|
| "statePath"
|
|
| "frameId"
|
|
| "observedCommandCount"
|
|
| "appliedCommandCount"
|
|
| "rejectedCommandCount"
|
|
| "status"
|
|
| "publicationSource"
|
|
| "transport"
|
|
| "commandBoundaryPath";
|
|
|
|
export const aetheriaRuntimeDaemonHealthDocumentSlots: Record<AetheriaRuntimeDaemonHealthDocumentSlot, number> = {
|
|
schema: 0,
|
|
daemonId: 1,
|
|
verseId: 2,
|
|
publishedAtUtc: 3,
|
|
statePath: 4,
|
|
frameId: 5,
|
|
observedCommandCount: 6,
|
|
appliedCommandCount: 7,
|
|
rejectedCommandCount: 8,
|
|
status: 9,
|
|
publicationSource: 10,
|
|
transport: 11,
|
|
commandBoundaryPath: 12,
|
|
};
|
|
|
|
export type AetheriaRuntimeAssetRefSlot =
|
|
| "assetKey"
|
|
| "kind"
|
|
| "uri"
|
|
| "transport"
|
|
| "contentHash"
|
|
| "mimeType"
|
|
| "metadata";
|
|
|
|
export const aetheriaRuntimeAssetRefSlots: Record<AetheriaRuntimeAssetRefSlot, number> = {
|
|
assetKey: 0,
|
|
kind: 1,
|
|
uri: 2,
|
|
transport: 3,
|
|
contentHash: 4,
|
|
mimeType: 5,
|
|
metadata: 6,
|
|
};
|
|
|
|
export type AetheriaRuntimeAssetManifestDocumentSlot =
|
|
| "schema"
|
|
| "publishedAtUtc"
|
|
| "runId"
|
|
| "baseUri"
|
|
| "assets";
|
|
|
|
export const aetheriaRuntimeAssetManifestDocumentSlots: Record<AetheriaRuntimeAssetManifestDocumentSlot, number> = {
|
|
schema: 0,
|
|
publishedAtUtc: 1,
|
|
runId: 2,
|
|
baseUri: 3,
|
|
assets: 4,
|
|
};
|
|
|
|
export type AetheriaRuntimeAssetManifestEntrySlot =
|
|
| "ref"
|
|
| "sizeBytes"
|
|
| "width"
|
|
| "height"
|
|
| "tags";
|
|
|
|
export const aetheriaRuntimeAssetManifestEntrySlots: Record<AetheriaRuntimeAssetManifestEntrySlot, number> = {
|
|
ref: 0,
|
|
sizeBytes: 1,
|
|
width: 2,
|
|
height: 3,
|
|
tags: 4,
|
|
};
|
|
|
|
export type AetheriaRuntimeGameViewportDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "zoneName"
|
|
| "currentEntityKey"
|
|
| "viewport"
|
|
| "controlledEntityIndices"
|
|
| "objects"
|
|
| "gravityInfluences"
|
|
| "bodies";
|
|
|
|
export const aetheriaRuntimeGameViewportDocumentSlots: Record<AetheriaRuntimeGameViewportDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
zoneName: 6,
|
|
currentEntityKey: 7,
|
|
viewport: 8,
|
|
controlledEntityIndices: 9,
|
|
objects: 10,
|
|
gravityInfluences: 11,
|
|
bodies: 12,
|
|
};
|
|
|
|
export type AetheriaRuntimeObjectsViewportDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "zoneName"
|
|
| "currentEntityKey"
|
|
| "viewport"
|
|
| "controlledEntityIndices"
|
|
| "objects";
|
|
|
|
export const aetheriaRuntimeObjectsViewportDocumentSlots: Record<AetheriaRuntimeObjectsViewportDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
zoneName: 6,
|
|
currentEntityKey: 7,
|
|
viewport: 8,
|
|
controlledEntityIndices: 9,
|
|
objects: 10,
|
|
};
|
|
|
|
export type AetheriaRuntimeGravityViewportDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "zoneName"
|
|
| "viewport"
|
|
| "gravityInfluences"
|
|
| "bodies"
|
|
| "terrainRadius"
|
|
| "terrainDepth"
|
|
| "terrainDepthExponent"
|
|
| "terrainWaveFrequency";
|
|
|
|
export const aetheriaRuntimeGravityViewportDocumentSlots: Record<AetheriaRuntimeGravityViewportDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
zoneName: 6,
|
|
viewport: 7,
|
|
gravityInfluences: 8,
|
|
bodies: 9,
|
|
terrainRadius: 10,
|
|
terrainDepth: 11,
|
|
terrainDepthExponent: 12,
|
|
terrainWaveFrequency: 13,
|
|
};
|
|
|
|
export type AetheriaRuntimeRenderSplatsViewportDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "zoneName"
|
|
| "viewport"
|
|
| "layers"
|
|
| "splats";
|
|
|
|
export const aetheriaRuntimeRenderSplatsViewportDocumentSlots: Record<AetheriaRuntimeRenderSplatsViewportDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
zoneName: 6,
|
|
viewport: 7,
|
|
layers: 8,
|
|
splats: 9,
|
|
};
|
|
|
|
export type AetheriaRuntimeRenderSplatLayerDefinitionSlot =
|
|
| "layerKey"
|
|
| "displayName"
|
|
| "channel"
|
|
| "blendMode"
|
|
| "graphicsFormat"
|
|
| "clearBeforeDraw"
|
|
| "clearR"
|
|
| "clearG"
|
|
| "clearB"
|
|
| "clearA";
|
|
|
|
export const aetheriaRuntimeRenderSplatLayerDefinitionSlots: Record<AetheriaRuntimeRenderSplatLayerDefinitionSlot, number> = {
|
|
layerKey: 0,
|
|
displayName: 1,
|
|
channel: 2,
|
|
blendMode: 3,
|
|
graphicsFormat: 4,
|
|
clearBeforeDraw: 5,
|
|
clearR: 6,
|
|
clearG: 7,
|
|
clearB: 8,
|
|
clearA: 9,
|
|
};
|
|
|
|
export type AetheriaRuntimeRenderSplatSoaSlot =
|
|
| "count"
|
|
| "centerX"
|
|
| "centerY"
|
|
| "halfExtentX"
|
|
| "halfExtentY"
|
|
| "rotationCos"
|
|
| "rotationSin"
|
|
| "channel"
|
|
| "falloff"
|
|
| "valueR"
|
|
| "valueG"
|
|
| "valueB"
|
|
| "valueA"
|
|
| "sourceKey"
|
|
| "layerIndex"
|
|
| "sourceKind"
|
|
| "frequencyX"
|
|
| "frequencyY"
|
|
| "phaseX"
|
|
| "phaseY"
|
|
| "animationSpeed"
|
|
| "sourceFlags";
|
|
|
|
export const aetheriaRuntimeRenderSplatSoaSlots: Record<AetheriaRuntimeRenderSplatSoaSlot, number> = {
|
|
count: 0,
|
|
centerX: 1,
|
|
centerY: 2,
|
|
halfExtentX: 3,
|
|
halfExtentY: 4,
|
|
rotationCos: 5,
|
|
rotationSin: 6,
|
|
channel: 7,
|
|
falloff: 8,
|
|
valueR: 9,
|
|
valueG: 10,
|
|
valueB: 11,
|
|
valueA: 12,
|
|
sourceKey: 13,
|
|
layerIndex: 14,
|
|
sourceKind: 15,
|
|
frequencyX: 16,
|
|
frequencyY: 17,
|
|
phaseX: 18,
|
|
phaseY: 19,
|
|
animationSpeed: 20,
|
|
sourceFlags: 21,
|
|
};
|
|
|
|
export type AetheriaRuntimeCurrentZoneDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "zoneName"
|
|
| "positionX"
|
|
| "positionY"
|
|
| "currentEntityKey"
|
|
| "adjacentZoneIndices";
|
|
|
|
export const aetheriaRuntimeCurrentZoneDocumentSlots: Record<AetheriaRuntimeCurrentZoneDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
zoneName: 6,
|
|
positionX: 7,
|
|
positionY: 8,
|
|
currentEntityKey: 9,
|
|
adjacentZoneIndices: 10,
|
|
};
|
|
|
|
export type AetheriaRuntimeCurrentEntityDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "entityKey"
|
|
| "entityIndex"
|
|
| "entity"
|
|
| "status"
|
|
| "inventory"
|
|
| "equipment"
|
|
| "cargo"
|
|
| "shutdownPerformance"
|
|
| "hud";
|
|
|
|
export const aetheriaRuntimeCurrentEntityDocumentSlots: Record<AetheriaRuntimeCurrentEntityDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
entityKey: 6,
|
|
entityIndex: 7,
|
|
entity: 8,
|
|
status: 9,
|
|
inventory: 10,
|
|
equipment: 11,
|
|
cargo: 12,
|
|
shutdownPerformance: 13,
|
|
hud: 14,
|
|
};
|
|
|
|
export type AetheriaRuntimeCurrentDockingDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "currentEntityKey"
|
|
| "currentEntityIndex"
|
|
| "isDocked"
|
|
| "dockParentEntityKey"
|
|
| "dockParentEntityIndex"
|
|
| "dockingBayIndex"
|
|
| "dockParent"
|
|
| "dockParentOrbitKey"
|
|
| "dockParentParentOrbitKey"
|
|
| "dockParentParentBodyKey";
|
|
|
|
export const aetheriaRuntimeCurrentDockingDocumentSlots: Record<AetheriaRuntimeCurrentDockingDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
currentEntityKey: 6,
|
|
currentEntityIndex: 7,
|
|
isDocked: 8,
|
|
dockParentEntityKey: 9,
|
|
dockParentEntityIndex: 10,
|
|
dockingBayIndex: 11,
|
|
dockParent: 12,
|
|
dockParentOrbitKey: 13,
|
|
dockParentParentOrbitKey: 14,
|
|
dockParentParentBodyKey: 15,
|
|
};
|
|
|
|
export type AetheriaRuntimeStationRefitDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "currentEntityKey"
|
|
| "currentEntityIndex"
|
|
| "isDocked"
|
|
| "dockParentEntityKey"
|
|
| "dockParentEntityIndex"
|
|
| "dockingBayIndex"
|
|
| "dockParent"
|
|
| "availableEntities"
|
|
| "credits"
|
|
| "stationStock"
|
|
| "dockingBays"
|
|
| "loadoutRestoreOptions"
|
|
| "cargoTargets";
|
|
|
|
export const aetheriaRuntimeStationRefitDocumentSlots: Record<AetheriaRuntimeStationRefitDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
currentEntityKey: 6,
|
|
currentEntityIndex: 7,
|
|
isDocked: 8,
|
|
dockParentEntityKey: 9,
|
|
dockParentEntityIndex: 10,
|
|
dockingBayIndex: 11,
|
|
dockParent: 12,
|
|
availableEntities: 13,
|
|
credits: 14,
|
|
stationStock: 15,
|
|
dockingBays: 16,
|
|
loadoutRestoreOptions: 17,
|
|
cargoTargets: 18,
|
|
};
|
|
|
|
export type AetheriaRuntimeStationRefitEntityOptionSlot =
|
|
| "entityKey"
|
|
| "entityIndex"
|
|
| "displayName"
|
|
| "kind"
|
|
| "isCurrentEntity"
|
|
| "isPlayerShip"
|
|
| "cargoBayCount"
|
|
| "dockingBayIndex"
|
|
| "hullItemKey"
|
|
| "cargoItems";
|
|
|
|
export const aetheriaRuntimeStationRefitEntityOptionSlots: Record<AetheriaRuntimeStationRefitEntityOptionSlot, number> = {
|
|
entityKey: 0,
|
|
entityIndex: 1,
|
|
displayName: 2,
|
|
kind: 3,
|
|
isCurrentEntity: 4,
|
|
isPlayerShip: 5,
|
|
cargoBayCount: 6,
|
|
dockingBayIndex: 7,
|
|
hullItemKey: 8,
|
|
cargoItems: 9,
|
|
};
|
|
|
|
export type AetheriaRuntimeStationStockItemSlot =
|
|
| "itemKey"
|
|
| "quantity"
|
|
| "quality"
|
|
| "durability"
|
|
| "cargoBayIndex"
|
|
| "x"
|
|
| "y"
|
|
| "price"
|
|
| "canAfford"
|
|
| "ownedQuantity";
|
|
|
|
export const aetheriaRuntimeStationStockItemSlots: Record<AetheriaRuntimeStationStockItemSlot, number> = {
|
|
itemKey: 0,
|
|
quantity: 1,
|
|
quality: 2,
|
|
durability: 3,
|
|
cargoBayIndex: 4,
|
|
x: 5,
|
|
y: 6,
|
|
price: 7,
|
|
canAfford: 8,
|
|
ownedQuantity: 9,
|
|
};
|
|
|
|
export type AetheriaRuntimeSectorMapDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "currentZoneIndex"
|
|
| "entranceZoneIndex"
|
|
| "exitZoneIndex"
|
|
| "discoveredZoneIndices"
|
|
| "zones"
|
|
| "links"
|
|
| "isTutorial"
|
|
| "generationSeed"
|
|
| "factionRelationships";
|
|
|
|
export const aetheriaRuntimeSectorMapDocumentSlots: Record<AetheriaRuntimeSectorMapDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
currentZoneIndex: 5,
|
|
entranceZoneIndex: 6,
|
|
exitZoneIndex: 7,
|
|
discoveredZoneIndices: 8,
|
|
zones: 9,
|
|
links: 10,
|
|
isTutorial: 11,
|
|
generationSeed: 12,
|
|
factionRelationships: 13,
|
|
};
|
|
|
|
export type AetheriaRuntimeSectorMapZoneSlot =
|
|
| "zoneIndex"
|
|
| "name"
|
|
| "x"
|
|
| "y"
|
|
| "ownerFactionIndex"
|
|
| "factionIndices"
|
|
| "adjacentZoneIndices"
|
|
| "discovered"
|
|
| "current"
|
|
| "entrance"
|
|
| "exit";
|
|
|
|
export const aetheriaRuntimeSectorMapZoneSlots: Record<AetheriaRuntimeSectorMapZoneSlot, number> = {
|
|
zoneIndex: 0,
|
|
name: 1,
|
|
x: 2,
|
|
y: 3,
|
|
ownerFactionIndex: 4,
|
|
factionIndices: 5,
|
|
adjacentZoneIndices: 6,
|
|
discovered: 7,
|
|
current: 8,
|
|
entrance: 9,
|
|
exit: 10,
|
|
};
|
|
|
|
export type AetheriaRuntimeSectorMapLinkSlot =
|
|
| "fromZoneIndex"
|
|
| "toZoneIndex"
|
|
| "discovered";
|
|
|
|
export const aetheriaRuntimeSectorMapLinkSlots: Record<AetheriaRuntimeSectorMapLinkSlot, number> = {
|
|
fromZoneIndex: 0,
|
|
toZoneIndex: 1,
|
|
discovered: 2,
|
|
};
|
|
|
|
export type AetheriaRuntimeZoneRenderDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "simulationTimeSeconds"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "zoneName"
|
|
| "currentEntityKey"
|
|
| "zoneRenderRadius"
|
|
| "credits"
|
|
| "adjacentZones"
|
|
| "bodyPoses"
|
|
| "asteroidBeltPoses"
|
|
| "wormholeExits"
|
|
| "droppedPickups"
|
|
| "entitySnapshots"
|
|
| "orbits"
|
|
| "bodies"
|
|
| "projectiles";
|
|
|
|
export const aetheriaRuntimeZoneRenderDocumentSlots: Record<AetheriaRuntimeZoneRenderDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
simulationTimeSeconds: 3,
|
|
runId: 4,
|
|
zoneIndex: 5,
|
|
zoneName: 6,
|
|
currentEntityKey: 7,
|
|
zoneRenderRadius: 8,
|
|
credits: 9,
|
|
adjacentZones: 12,
|
|
bodyPoses: 13,
|
|
asteroidBeltPoses: 14,
|
|
wormholeExits: 15,
|
|
droppedPickups: 16,
|
|
entitySnapshots: 17,
|
|
orbits: 18,
|
|
bodies: 19,
|
|
projectiles: 20,
|
|
};
|
|
|
|
export type AetheriaRuntimeZoneRenderBodyPoseSlot =
|
|
| "bodyKey"
|
|
| "orbitKey"
|
|
| "parentOrbitKey"
|
|
| "kind"
|
|
| "centerX"
|
|
| "centerZ"
|
|
| "parentCenterX"
|
|
| "parentCenterZ"
|
|
| "gravityWaveSpeed";
|
|
|
|
export const aetheriaRuntimeZoneRenderBodyPoseSlots: Record<AetheriaRuntimeZoneRenderBodyPoseSlot, number> = {
|
|
bodyKey: 0,
|
|
orbitKey: 1,
|
|
parentOrbitKey: 2,
|
|
kind: 3,
|
|
centerX: 4,
|
|
centerZ: 5,
|
|
parentCenterX: 6,
|
|
parentCenterZ: 7,
|
|
gravityWaveSpeed: 8,
|
|
};
|
|
|
|
export type AetheriaRuntimeZoneRenderAsteroidBeltPoseSlot =
|
|
| "bodyKey"
|
|
| "orbitKey"
|
|
| "centerX"
|
|
| "centerZ"
|
|
| "radius"
|
|
| "asteroidCount"
|
|
| "instancePoses";
|
|
|
|
export const aetheriaRuntimeZoneRenderAsteroidBeltPoseSlots: Record<AetheriaRuntimeZoneRenderAsteroidBeltPoseSlot, number> = {
|
|
bodyKey: 0,
|
|
orbitKey: 1,
|
|
centerX: 2,
|
|
centerZ: 3,
|
|
radius: 4,
|
|
asteroidCount: 5,
|
|
instancePoses: 6,
|
|
};
|
|
|
|
export type AetheriaRuntimeSelectedObjectDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "entityIndex"
|
|
| "selected";
|
|
|
|
export const aetheriaRuntimeSelectedObjectDocumentSlots: Record<AetheriaRuntimeSelectedObjectDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
runId: 2,
|
|
zoneIndex: 3,
|
|
entityIndex: 4,
|
|
selected: 5,
|
|
};
|
|
|
|
export type AetheriaRuntimeInventoryDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "entityIndex"
|
|
| "entityKey"
|
|
| "items"
|
|
| "equipment"
|
|
| "cargo";
|
|
|
|
export const aetheriaRuntimeInventoryDocumentSlots: Record<AetheriaRuntimeInventoryDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
runId: 2,
|
|
zoneIndex: 3,
|
|
entityIndex: 4,
|
|
entityKey: 5,
|
|
items: 6,
|
|
equipment: 7,
|
|
cargo: 8,
|
|
};
|
|
|
|
export type AetheriaRuntimeRunCheckpointCommitSlot =
|
|
| "runId"
|
|
| "isTutorial"
|
|
| "entranceZoneIndex"
|
|
| "exitZoneIndex"
|
|
| "currentZoneIndex"
|
|
| "discoveredZoneIndices"
|
|
| "zones"
|
|
| "factionRelationships"
|
|
| "generationSeed"
|
|
| "currentEntityKey"
|
|
| "credits"
|
|
| "agentTasks";
|
|
|
|
export const aetheriaRuntimeRunCheckpointCommitSlots: Record<AetheriaRuntimeRunCheckpointCommitSlot, number> = {
|
|
runId: 0,
|
|
isTutorial: 1,
|
|
entranceZoneIndex: 2,
|
|
exitZoneIndex: 3,
|
|
currentZoneIndex: 4,
|
|
discoveredZoneIndices: 5,
|
|
zones: 6,
|
|
factionRelationships: 8,
|
|
generationSeed: 9,
|
|
currentEntityKey: 10,
|
|
credits: 11,
|
|
agentTasks: 12,
|
|
};
|
|
|
|
export type AetheriaRuntimeZoneSnapshotCommitSlot =
|
|
| "zoneIndex"
|
|
| "name"
|
|
| "positionX"
|
|
| "positionY"
|
|
| "adjacentZoneIndices"
|
|
| "factionIndices"
|
|
| "ownerFactionIndex"
|
|
| "entities"
|
|
| "orbits"
|
|
| "bodies"
|
|
| "droppedPickups"
|
|
| "gravityTerrainRadius"
|
|
| "gravityTerrainDepth"
|
|
| "gravityTerrainDepthExponent"
|
|
| "gravityTerrainBoundaryFog"
|
|
| "gravityTerrainWaveFrequency"
|
|
| "simulationTimeSeconds"
|
|
| "projectiles";
|
|
|
|
export const aetheriaRuntimeZoneSnapshotCommitSlots: Record<AetheriaRuntimeZoneSnapshotCommitSlot, number> = {
|
|
zoneIndex: 0,
|
|
name: 1,
|
|
positionX: 2,
|
|
positionY: 3,
|
|
adjacentZoneIndices: 4,
|
|
factionIndices: 5,
|
|
ownerFactionIndex: 6,
|
|
entities: 7,
|
|
orbits: 8,
|
|
bodies: 9,
|
|
droppedPickups: 10,
|
|
gravityTerrainRadius: 11,
|
|
gravityTerrainDepth: 12,
|
|
gravityTerrainDepthExponent: 13,
|
|
gravityTerrainBoundaryFog: 14,
|
|
gravityTerrainWaveFrequency: 15,
|
|
simulationTimeSeconds: 16,
|
|
projectiles: 17,
|
|
};
|
|
|
|
export type AetheriaRuntimeEntitySnapshotCommitSlot =
|
|
| "entityIndex"
|
|
| "name"
|
|
| "kind"
|
|
| "positionX"
|
|
| "positionY"
|
|
| "positionZ"
|
|
| "directionX"
|
|
| "directionY"
|
|
| "equipment"
|
|
| "cargoBays"
|
|
| "dockingBays"
|
|
| "childEntityIndices"
|
|
| "weaponGroups"
|
|
| "statGrids"
|
|
| "velocityX"
|
|
| "velocityY"
|
|
| "targetEntityIndex"
|
|
| "isActive"
|
|
| "heatsinksEnabled"
|
|
| "overrideShutdown"
|
|
| "tractorPower"
|
|
| "heatstroke"
|
|
| "hypothermia"
|
|
| "activeConsumables"
|
|
| "behaviorProgress"
|
|
| "weaponStates"
|
|
| "behaviorStates"
|
|
| "cargoContents"
|
|
| "dockingBayContents"
|
|
| "dockingBayAssignments"
|
|
| "visibility"
|
|
| "visibilitySourceCount"
|
|
| "contacts"
|
|
| "hullItemKey"
|
|
| "factionKey"
|
|
| "shutdownPerformance"
|
|
| "agentTaskCapabilities"
|
|
| "assignedAgentTaskId";
|
|
|
|
export const aetheriaRuntimeEntitySnapshotCommitSlots: Record<AetheriaRuntimeEntitySnapshotCommitSlot, number> = {
|
|
entityIndex: 0,
|
|
name: 1,
|
|
kind: 2,
|
|
positionX: 3,
|
|
positionY: 4,
|
|
positionZ: 5,
|
|
directionX: 6,
|
|
directionY: 7,
|
|
equipment: 10,
|
|
cargoBays: 11,
|
|
dockingBays: 12,
|
|
childEntityIndices: 13,
|
|
weaponGroups: 14,
|
|
statGrids: 15,
|
|
velocityX: 16,
|
|
velocityY: 17,
|
|
targetEntityIndex: 18,
|
|
isActive: 19,
|
|
heatsinksEnabled: 20,
|
|
overrideShutdown: 21,
|
|
tractorPower: 22,
|
|
heatstroke: 23,
|
|
hypothermia: 24,
|
|
activeConsumables: 25,
|
|
behaviorProgress: 26,
|
|
weaponStates: 27,
|
|
behaviorStates: 28,
|
|
cargoContents: 29,
|
|
dockingBayContents: 30,
|
|
dockingBayAssignments: 31,
|
|
visibility: 32,
|
|
visibilitySourceCount: 33,
|
|
contacts: 34,
|
|
hullItemKey: 35,
|
|
factionKey: 36,
|
|
shutdownPerformance: 37,
|
|
agentTaskCapabilities: 38,
|
|
assignedAgentTaskId: 39,
|
|
};
|
|
|
|
export type AetheriaRuntimeProjectileCommitSlot =
|
|
| "projectileId"
|
|
| "sourceEntityIndex"
|
|
| "targetEntityIndex"
|
|
| "factionKey"
|
|
| "positionX"
|
|
| "positionY"
|
|
| "positionZ"
|
|
| "directionX"
|
|
| "directionY"
|
|
| "velocityX"
|
|
| "velocityY"
|
|
| "damage"
|
|
| "radius"
|
|
| "ageSeconds"
|
|
| "lifetimeSeconds"
|
|
| "guided"
|
|
| "active"
|
|
| "weaponKind";
|
|
|
|
export const aetheriaRuntimeProjectileCommitSlots: Record<AetheriaRuntimeProjectileCommitSlot, number> = {
|
|
projectileId: 0,
|
|
sourceEntityIndex: 1,
|
|
targetEntityIndex: 2,
|
|
factionKey: 3,
|
|
positionX: 4,
|
|
positionY: 5,
|
|
positionZ: 6,
|
|
directionX: 7,
|
|
directionY: 8,
|
|
velocityX: 9,
|
|
velocityY: 10,
|
|
damage: 11,
|
|
radius: 12,
|
|
ageSeconds: 13,
|
|
lifetimeSeconds: 14,
|
|
guided: 15,
|
|
active: 16,
|
|
weaponKind: 17,
|
|
};
|
|
|
|
export type AetheriaRuntimeBodySnapshotCommitSlot =
|
|
| "kind"
|
|
| "name"
|
|
| "mass"
|
|
| "resources"
|
|
| "bodyRadiusMultiplier"
|
|
| "gravityRadiusMultiplier"
|
|
| "gravityDepthMultiplier"
|
|
| "gravityDepthExponent"
|
|
| "asteroids"
|
|
| "gasGiantVisual"
|
|
| "sunVisual"
|
|
| "bodyKey"
|
|
| "orbitKey"
|
|
| "gravityInfluenceCenterX"
|
|
| "gravityInfluenceCenterZ"
|
|
| "gravityInfluenceRadius"
|
|
| "gravityWellDepth"
|
|
| "gravityWaveRadius"
|
|
| "gravityWaveDepth"
|
|
| "gravityWaveSpeed"
|
|
| "iconSize";
|
|
|
|
export const aetheriaRuntimeBodySnapshotCommitSlots: Record<AetheriaRuntimeBodySnapshotCommitSlot, number> = {
|
|
kind: 1,
|
|
name: 2,
|
|
mass: 4,
|
|
resources: 5,
|
|
bodyRadiusMultiplier: 6,
|
|
gravityRadiusMultiplier: 7,
|
|
gravityDepthMultiplier: 8,
|
|
gravityDepthExponent: 9,
|
|
asteroids: 10,
|
|
gasGiantVisual: 11,
|
|
sunVisual: 12,
|
|
bodyKey: 13,
|
|
orbitKey: 14,
|
|
gravityInfluenceCenterX: 15,
|
|
gravityInfluenceCenterZ: 16,
|
|
gravityInfluenceRadius: 17,
|
|
gravityWellDepth: 18,
|
|
gravityWaveRadius: 19,
|
|
gravityWaveDepth: 20,
|
|
gravityWaveSpeed: 21,
|
|
iconSize: 22,
|
|
};
|
|
|
|
export type AetheriaRuntimeSunVisualCommitSlot =
|
|
| "lightColorX"
|
|
| "lightColorY"
|
|
| "lightColorZ"
|
|
| "fogTintColorX"
|
|
| "fogTintColorY"
|
|
| "fogTintColorZ"
|
|
| "lightRadiusMultiplier";
|
|
|
|
export const aetheriaRuntimeSunVisualCommitSlots: Record<AetheriaRuntimeSunVisualCommitSlot, number> = {
|
|
lightColorX: 0,
|
|
lightColorY: 1,
|
|
lightColorZ: 2,
|
|
fogTintColorX: 3,
|
|
fogTintColorY: 4,
|
|
fogTintColorZ: 5,
|
|
lightRadiusMultiplier: 6,
|
|
};
|
|
|
|
export type AetheriaRuntimeEntityStatGridCommitSlot =
|
|
| "name"
|
|
| "width"
|
|
| "height"
|
|
| "values";
|
|
|
|
export const aetheriaRuntimeEntityStatGridCommitSlots: Record<AetheriaRuntimeEntityStatGridCommitSlot, number> = {
|
|
name: 0,
|
|
width: 1,
|
|
height: 2,
|
|
values: 3,
|
|
};
|
|
|
|
export type AetheriaRuntimeCargoBayLoadoutCommitSlot =
|
|
| "items";
|
|
|
|
export const aetheriaRuntimeCargoBayLoadoutCommitSlots: Record<AetheriaRuntimeCargoBayLoadoutCommitSlot, number> = {
|
|
items: 0,
|
|
};
|
|
|
|
export type AetheriaRuntimeLoadoutItemSlotCommitSlot =
|
|
| "x"
|
|
| "y"
|
|
| "item";
|
|
|
|
export const aetheriaRuntimeLoadoutItemSlotCommitSlots: Record<AetheriaRuntimeLoadoutItemSlotCommitSlot, number> = {
|
|
x: 0,
|
|
y: 1,
|
|
item: 2,
|
|
};
|
|
|
|
export type AetheriaRuntimeLoadoutItemCommitSlot =
|
|
| "quality"
|
|
| "durability"
|
|
| "quantity"
|
|
| "enabled"
|
|
| "itemKey"
|
|
| "overrideShutdown"
|
|
| "temperature";
|
|
|
|
export const aetheriaRuntimeLoadoutItemCommitSlots: Record<AetheriaRuntimeLoadoutItemCommitSlot, number> = {
|
|
quality: 1,
|
|
durability: 2,
|
|
quantity: 3,
|
|
enabled: 4,
|
|
itemKey: 5,
|
|
overrideShutdown: 6,
|
|
temperature: 7,
|
|
};
|
|
|
|
export type AetheriaRuntimeGameViewportBoundsSlot =
|
|
| "minX"
|
|
| "minY"
|
|
| "maxX"
|
|
| "maxY";
|
|
|
|
export const aetheriaRuntimeGameViewportBoundsSlots: Record<AetheriaRuntimeGameViewportBoundsSlot, number> = {
|
|
minX: 0,
|
|
minY: 1,
|
|
maxX: 2,
|
|
maxY: 3,
|
|
};
|
|
|
|
export type AetheriaRuntimeGameViewportObjectSlot =
|
|
| "entityIndex"
|
|
| "entityKey"
|
|
| "displayName"
|
|
| "kind"
|
|
| "factionKey"
|
|
| "x"
|
|
| "y"
|
|
| "z"
|
|
| "directionX"
|
|
| "directionY"
|
|
| "velocityX"
|
|
| "velocityY"
|
|
| "controlled"
|
|
| "targetEntityIndex"
|
|
| "isActive"
|
|
| "visibility"
|
|
| "status"
|
|
| "inventory"
|
|
| "iconAsset";
|
|
|
|
export const aetheriaRuntimeGameViewportObjectSlots: Record<AetheriaRuntimeGameViewportObjectSlot, number> = {
|
|
entityIndex: 0,
|
|
entityKey: 1,
|
|
displayName: 2,
|
|
kind: 3,
|
|
factionKey: 4,
|
|
x: 5,
|
|
y: 6,
|
|
z: 7,
|
|
directionX: 8,
|
|
directionY: 9,
|
|
velocityX: 10,
|
|
velocityY: 11,
|
|
controlled: 12,
|
|
targetEntityIndex: 13,
|
|
isActive: 14,
|
|
visibility: 15,
|
|
status: 16,
|
|
inventory: 17,
|
|
iconAsset: 18,
|
|
};
|
|
|
|
export type AetheriaRuntimeRtsEntityStatusSlot =
|
|
| "hull"
|
|
| "shield"
|
|
| "heat";
|
|
|
|
export const aetheriaRuntimeRtsEntityStatusSlots: Record<AetheriaRuntimeRtsEntityStatusSlot, number> = {
|
|
hull: 0,
|
|
shield: 1,
|
|
heat: 2,
|
|
};
|
|
|
|
export type AetheriaRuntimeRtsInventoryItemSlot =
|
|
| "source"
|
|
| "itemKey"
|
|
| "quantity"
|
|
| "quality"
|
|
| "durability"
|
|
| "enabled"
|
|
| "sourceIndex"
|
|
| "x"
|
|
| "y"
|
|
| "iconAsset";
|
|
|
|
export const aetheriaRuntimeRtsInventoryItemSlots: Record<AetheriaRuntimeRtsInventoryItemSlot, number> = {
|
|
source: 0,
|
|
itemKey: 1,
|
|
quantity: 2,
|
|
quality: 3,
|
|
durability: 4,
|
|
enabled: 5,
|
|
sourceIndex: 6,
|
|
x: 7,
|
|
y: 8,
|
|
iconAsset: 9,
|
|
};
|
|
|
|
export type AetheriaRuntimeRtsGravityInfluenceSlot =
|
|
| "bodyKey"
|
|
| "orbitKey"
|
|
| "kind"
|
|
| "x"
|
|
| "y"
|
|
| "radius"
|
|
| "gravityDepth"
|
|
| "gravityDepthExponent"
|
|
| "waveRadius"
|
|
| "waveDepth"
|
|
| "waveSpeed";
|
|
|
|
export const aetheriaRuntimeRtsGravityInfluenceSlots: Record<AetheriaRuntimeRtsGravityInfluenceSlot, number> = {
|
|
bodyKey: 0,
|
|
orbitKey: 1,
|
|
kind: 2,
|
|
x: 3,
|
|
y: 4,
|
|
radius: 5,
|
|
gravityDepth: 6,
|
|
gravityDepthExponent: 7,
|
|
waveRadius: 8,
|
|
waveDepth: 9,
|
|
waveSpeed: 10,
|
|
};
|
|
|
|
export type AetheriaRuntimeRtsBodyViewSlot =
|
|
| "bodyKey"
|
|
| "orbitKey"
|
|
| "name"
|
|
| "kind"
|
|
| "x"
|
|
| "y"
|
|
| "radius"
|
|
| "isAsteroidBelt"
|
|
| "body"
|
|
| "iconAsset"
|
|
| "iconSize";
|
|
|
|
export const aetheriaRuntimeRtsBodyViewSlots: Record<AetheriaRuntimeRtsBodyViewSlot, number> = {
|
|
bodyKey: 0,
|
|
orbitKey: 1,
|
|
name: 2,
|
|
kind: 3,
|
|
x: 4,
|
|
y: 5,
|
|
radius: 6,
|
|
isAsteroidBelt: 7,
|
|
body: 8,
|
|
iconAsset: 9,
|
|
iconSize: 10,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeScenarioDocumentSlot =
|
|
| "schema"
|
|
| "scenarioId"
|
|
| "displayName"
|
|
| "startingBaseKey"
|
|
| "stationStock"
|
|
| "availableShipKeys"
|
|
| "waves"
|
|
| "attackerMixKeys"
|
|
| "recoveredTechnologyPoolKeys"
|
|
| "runtimeRoles";
|
|
|
|
export const aetheriaRuntimeStarbridgeScenarioDocumentSlots: Record<AetheriaRuntimeStarbridgeScenarioDocumentSlot, number> = {
|
|
schema: 0,
|
|
scenarioId: 1,
|
|
displayName: 2,
|
|
startingBaseKey: 3,
|
|
stationStock: 4,
|
|
availableShipKeys: 5,
|
|
waves: 6,
|
|
attackerMixKeys: 7,
|
|
recoveredTechnologyPoolKeys: 8,
|
|
runtimeRoles: 9,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeSessionDocumentSlot =
|
|
| "schema"
|
|
| "sessionId"
|
|
| "scenarioId"
|
|
| "runId"
|
|
| "baseEntityKey"
|
|
| "stationEntityKey"
|
|
| "phase"
|
|
| "currentWaveIndex"
|
|
| "runtimeRoles";
|
|
|
|
export const aetheriaRuntimeStarbridgeSessionDocumentSlots: Record<AetheriaRuntimeStarbridgeSessionDocumentSlot, number> = {
|
|
schema: 0,
|
|
sessionId: 1,
|
|
scenarioId: 2,
|
|
runId: 3,
|
|
baseEntityKey: 4,
|
|
stationEntityKey: 5,
|
|
phase: 6,
|
|
currentWaveIndex: 7,
|
|
runtimeRoles: 8,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeSessionSummaryDocumentSlot =
|
|
| "schema"
|
|
| "frameId"
|
|
| "publishedAtUtc"
|
|
| "sessionId"
|
|
| "scenarioId"
|
|
| "scenarioName"
|
|
| "runId"
|
|
| "zoneIndex"
|
|
| "zoneName"
|
|
| "phase"
|
|
| "currentWaveIndex"
|
|
| "baseStatus"
|
|
| "stationStock"
|
|
| "waveForecast"
|
|
| "runtimeRoles";
|
|
|
|
export const aetheriaRuntimeStarbridgeSessionSummaryDocumentSlots: Record<AetheriaRuntimeStarbridgeSessionSummaryDocumentSlot, number> = {
|
|
schema: 0,
|
|
frameId: 1,
|
|
publishedAtUtc: 2,
|
|
sessionId: 3,
|
|
scenarioId: 4,
|
|
scenarioName: 5,
|
|
runId: 6,
|
|
zoneIndex: 7,
|
|
zoneName: 8,
|
|
phase: 9,
|
|
currentWaveIndex: 10,
|
|
baseStatus: 11,
|
|
stationStock: 12,
|
|
waveForecast: 13,
|
|
runtimeRoles: 14,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeStationStockItemSlot =
|
|
| "itemKey"
|
|
| "quantity"
|
|
| "quality"
|
|
| "durability"
|
|
| "source"
|
|
| "iconAsset";
|
|
|
|
export const aetheriaRuntimeStarbridgeStationStockItemSlots: Record<AetheriaRuntimeStarbridgeStationStockItemSlot, number> = {
|
|
itemKey: 0,
|
|
quantity: 1,
|
|
quality: 2,
|
|
durability: 3,
|
|
source: 4,
|
|
iconAsset: 5,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeWaveDefinitionSlot =
|
|
| "waveIndex"
|
|
| "displayName"
|
|
| "attackerKeys"
|
|
| "startsAfterSeconds"
|
|
| "bossKey"
|
|
| "recoveredTechnologyKeys";
|
|
|
|
export const aetheriaRuntimeStarbridgeWaveDefinitionSlots: Record<AetheriaRuntimeStarbridgeWaveDefinitionSlot, number> = {
|
|
waveIndex: 0,
|
|
displayName: 1,
|
|
attackerKeys: 2,
|
|
startsAfterSeconds: 3,
|
|
bossKey: 4,
|
|
recoveredTechnologyKeys: 5,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeWaveForecastSlot =
|
|
| "waveIndex"
|
|
| "displayName"
|
|
| "attackerKeys"
|
|
| "bossKey"
|
|
| "recoveredTechnologyKeys";
|
|
|
|
export const aetheriaRuntimeStarbridgeWaveForecastSlots: Record<AetheriaRuntimeStarbridgeWaveForecastSlot, number> = {
|
|
waveIndex: 0,
|
|
displayName: 1,
|
|
attackerKeys: 2,
|
|
bossKey: 3,
|
|
recoveredTechnologyKeys: 4,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeRuntimeRoleSlot =
|
|
| "runtimeId"
|
|
| "role"
|
|
| "entityKey";
|
|
|
|
export const aetheriaRuntimeStarbridgeRuntimeRoleSlots: Record<AetheriaRuntimeStarbridgeRuntimeRoleSlot, number> = {
|
|
runtimeId: 0,
|
|
role: 1,
|
|
entityKey: 2,
|
|
};
|
|
|
|
export type AetheriaRuntimeStarbridgeBaseStatusSlot =
|
|
| "entityKey"
|
|
| "displayName"
|
|
| "hull"
|
|
| "shield"
|
|
| "heat"
|
|
| "isActive";
|
|
|
|
export const aetheriaRuntimeStarbridgeBaseStatusSlots: Record<AetheriaRuntimeStarbridgeBaseStatusSlot, number> = {
|
|
entityKey: 0,
|
|
displayName: 1,
|
|
hull: 2,
|
|
shield: 3,
|
|
heat: 4,
|
|
isActive: 5,
|
|
};
|
|
|
|
export type AetheriaRuntimeVerseAuthorityPolicyDocumentSlot =
|
|
| "schema"
|
|
| "verseId"
|
|
| "policyId"
|
|
| "ruleVersion"
|
|
| "hostRuntimeId"
|
|
| "defaultMode"
|
|
| "rules"
|
|
| "updatedAtUtc"
|
|
| "deploymentMode"
|
|
| "runtimeRoles";
|
|
|
|
export const aetheriaRuntimeVerseAuthorityPolicyDocumentSlots: Record<AetheriaRuntimeVerseAuthorityPolicyDocumentSlot, number> = {
|
|
schema: 0,
|
|
verseId: 1,
|
|
policyId: 2,
|
|
ruleVersion: 3,
|
|
hostRuntimeId: 4,
|
|
defaultMode: 5,
|
|
rules: 6,
|
|
updatedAtUtc: 7,
|
|
deploymentMode: 8,
|
|
runtimeRoles: 9,
|
|
};
|
|
|
|
export type AetheriaRuntimeAuthorityRuleSlot =
|
|
| "ruleId"
|
|
| "subjectPrefix"
|
|
| "claimKinds"
|
|
| "mode"
|
|
| "runtimeIds"
|
|
| "leaseScope"
|
|
| "priority";
|
|
|
|
export const aetheriaRuntimeAuthorityRuleSlots: Record<AetheriaRuntimeAuthorityRuleSlot, number> = {
|
|
ruleId: 0,
|
|
subjectPrefix: 1,
|
|
claimKinds: 2,
|
|
mode: 3,
|
|
runtimeIds: 4,
|
|
leaseScope: 5,
|
|
priority: 6,
|
|
};
|
|
|
|
export type AetheriaRuntimeAuthorityRuntimeRoleSlot =
|
|
| "runtimeId"
|
|
| "roles";
|
|
|
|
export const aetheriaRuntimeAuthorityRuntimeRoleSlots: Record<AetheriaRuntimeAuthorityRuntimeRoleSlot, number> = {
|
|
runtimeId: 0,
|
|
roles: 1,
|
|
};
|
|
|
|
export type AetheriaRuntimeAuthorityLeaseDocumentSlot =
|
|
| "schema"
|
|
| "leaseId"
|
|
| "verseId"
|
|
| "runtimeId"
|
|
| "subjectPrefix"
|
|
| "claimKinds"
|
|
| "validFromUtc"
|
|
| "expiresAtUtc"
|
|
| "scope";
|
|
|
|
export const aetheriaRuntimeAuthorityLeaseDocumentSlots: Record<AetheriaRuntimeAuthorityLeaseDocumentSlot, number> = {
|
|
schema: 0,
|
|
leaseId: 1,
|
|
verseId: 2,
|
|
runtimeId: 3,
|
|
subjectPrefix: 4,
|
|
claimKinds: 5,
|
|
validFromUtc: 6,
|
|
expiresAtUtc: 7,
|
|
scope: 8,
|
|
};
|
|
|
|
export type ViewportResponse = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
simulationTimeSeconds: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
currentEntityKey: string;
|
|
viewport: CultMeshViewportRequest;
|
|
controlledEntityIndices: number[];
|
|
objects: ViewObject[];
|
|
gravityInfluences: GravityInfluence[];
|
|
bodies: BodyView[];
|
|
};
|
|
|
|
export type ObjectsViewportResponse = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
simulationTimeSeconds: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
currentEntityKey: string;
|
|
viewport: CultMeshViewportRequest;
|
|
controlledEntityIndices: number[];
|
|
objects: ViewObject[];
|
|
};
|
|
|
|
export type GravityViewportResponse = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
simulationTimeSeconds: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
viewport: CultMeshViewportRequest;
|
|
gravityInfluences: GravityInfluence[];
|
|
bodies: BodyView[];
|
|
};
|
|
|
|
export type RenderSplatsViewportResponse = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
simulationTimeSeconds: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
viewport: CultMeshViewportRequest;
|
|
layers: RenderSplatLayerDefinition[];
|
|
splats: RenderSplatSoa;
|
|
};
|
|
|
|
export type RenderSplatLayerDefinition = {
|
|
layerKey: string;
|
|
displayName: string;
|
|
channel: number;
|
|
blendMode: string;
|
|
graphicsFormat: string;
|
|
clearBeforeDraw: boolean;
|
|
clearR: number;
|
|
clearG: number;
|
|
clearB: number;
|
|
clearA: number;
|
|
};
|
|
|
|
export type RenderSplatSoa = {
|
|
count: number;
|
|
centerX: number[];
|
|
centerY: number[];
|
|
halfExtentX: number[];
|
|
halfExtentY: number[];
|
|
rotationCos: number[];
|
|
rotationSin: number[];
|
|
channel: number[];
|
|
falloff: number[];
|
|
valueR: number[];
|
|
valueG: number[];
|
|
valueB: number[];
|
|
valueA: number[];
|
|
sourceKey: string[];
|
|
layerIndex: number[];
|
|
sourceKind: number[];
|
|
frequencyX: number[];
|
|
frequencyY: number[];
|
|
phaseX: number[];
|
|
phaseY: number[];
|
|
animationSpeed: number[];
|
|
sourceFlags: number[];
|
|
};
|
|
|
|
export type ViewObject = {
|
|
entityIndex: number;
|
|
entityKey: string;
|
|
displayName: string;
|
|
kind: string;
|
|
factionKey: string;
|
|
x: number;
|
|
y: number;
|
|
z: number;
|
|
directionX: number;
|
|
directionY: number;
|
|
velocityX: number;
|
|
velocityY: number;
|
|
controlled: boolean;
|
|
targetEntityIndex: number;
|
|
isActive: boolean;
|
|
visibility: number;
|
|
iconAsset: AssetRef;
|
|
status: EntityStatus;
|
|
inventory: InventoryItem[];
|
|
};
|
|
|
|
export type EntityStatus = {
|
|
hull: number;
|
|
shield: number;
|
|
heat: number;
|
|
};
|
|
|
|
export type InventoryItem = {
|
|
source: string;
|
|
itemKey: string;
|
|
quantity: number;
|
|
quality: number;
|
|
durability: number;
|
|
enabled: boolean;
|
|
iconAsset: AssetRef;
|
|
};
|
|
|
|
export type SelectedObjectDocument = {
|
|
schema: string;
|
|
frameId: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
entityIndex: number;
|
|
selected: ViewObject | null;
|
|
};
|
|
|
|
export type InventoryDocument = {
|
|
schema: string;
|
|
frameId: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
entityIndex: number;
|
|
entityKey: string;
|
|
items: InventoryItem[];
|
|
equipment: InventoryItem[];
|
|
cargo: InventoryItem[];
|
|
};
|
|
|
|
export type DaemonHealthDocument = {
|
|
schema: string;
|
|
daemonId: string;
|
|
verseId: string;
|
|
publishedAtUtc: string;
|
|
statePath: string;
|
|
frameId: number;
|
|
observedCommandCount: number;
|
|
appliedCommandCount: number;
|
|
rejectedCommandCount: number;
|
|
status: string;
|
|
publicationSource: string;
|
|
transport: string;
|
|
commandBoundaryPath: string;
|
|
};
|
|
|
|
export type AuthorityStatusDocument = {
|
|
schema: string;
|
|
verseId: string;
|
|
policyId: string;
|
|
ruleVersion: string;
|
|
hostRuntimeId: string;
|
|
defaultMode: string;
|
|
updatedAtUtc: string;
|
|
rules: AuthorityRuleDocument[];
|
|
};
|
|
|
|
export type AuthorityRuleDocument = {
|
|
ruleId: string;
|
|
subjectPrefix: string;
|
|
claimKinds: string[];
|
|
mode: string;
|
|
runtimeIds: string[];
|
|
leaseScope: string;
|
|
priority: number;
|
|
};
|
|
|
|
export type StarbridgeSessionDocument = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
sessionId: string;
|
|
scenarioId: string;
|
|
scenarioName: string;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
phase: string;
|
|
currentWaveIndex: number;
|
|
baseStatus: StarbridgeBaseStatusDocument;
|
|
stationStock: StarbridgeStationStockItemDocument[];
|
|
waveForecast: StarbridgeWaveForecastDocument[];
|
|
runtimeRoles: StarbridgeRuntimeRoleDocument[];
|
|
};
|
|
|
|
export type StarbridgeBaseStatusDocument = {
|
|
entityKey: string;
|
|
displayName: string;
|
|
hull: number;
|
|
shield: number;
|
|
heat: number;
|
|
isActive: boolean;
|
|
};
|
|
|
|
export type StarbridgeStationStockItemDocument = {
|
|
itemKey: string;
|
|
quantity: number;
|
|
quality: number;
|
|
durability: number;
|
|
source: string;
|
|
iconAsset: AssetRef;
|
|
};
|
|
|
|
export type AssetManifestDocument = {
|
|
schema: string;
|
|
publishedAtUtc: string;
|
|
runId: string;
|
|
baseUri: string;
|
|
assets: AssetManifestEntry[];
|
|
};
|
|
|
|
export type AssetManifestEntry = {
|
|
ref: AssetRef;
|
|
sizeBytes: number;
|
|
width: number;
|
|
height: number;
|
|
tags: string[];
|
|
};
|
|
|
|
export type AssetRef = {
|
|
assetKey: string;
|
|
kind: string;
|
|
uri: string;
|
|
transport: string;
|
|
contentHash: string;
|
|
mimeType: string;
|
|
metadata: Record<string, string>;
|
|
};
|
|
|
|
export type StarbridgeWaveForecastDocument = {
|
|
waveIndex: number;
|
|
displayName: string;
|
|
attackerKeys: string[];
|
|
bossKey: string;
|
|
recoveredTechnologyKeys: string[];
|
|
};
|
|
|
|
export type StarbridgeRuntimeRoleDocument = {
|
|
runtimeId: string;
|
|
role: string;
|
|
entityKey: string;
|
|
};
|
|
|
|
export type GravityInfluence = {
|
|
bodyKey: string;
|
|
orbitKey: string;
|
|
kind: string;
|
|
x: number;
|
|
y: number;
|
|
radius: number;
|
|
gravityDepth: number;
|
|
gravityDepthExponent: number;
|
|
waveRadius: number;
|
|
waveDepth: number;
|
|
waveSpeed: number;
|
|
};
|
|
|
|
export type BodyView = {
|
|
bodyKey: string;
|
|
orbitKey: string;
|
|
name: string;
|
|
kind: string;
|
|
x: number;
|
|
y: number;
|
|
radius: number;
|
|
isAsteroidBelt: boolean;
|
|
iconAsset: AssetRef;
|
|
iconSize: number;
|
|
};
|
|
|
|
|
|
export type AetheriaRuntimeSetMoveVectorRequest = {
|
|
actorEntityKey: string;
|
|
directionX: number;
|
|
directionY: number;
|
|
scalar: number;
|
|
observedFrameId?: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeSetTargetRequest = {
|
|
actorEntityKey: string;
|
|
targetEntityKey: string;
|
|
observedFrameId?: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeDaemonCommandReceipt = CultMeshOperationReceipt & {
|
|
commandId: string;
|
|
};
|
|
|
|
export type AetheriaRuntimeSelectedObjectRequest = {
|
|
entityIndex: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeViewportFeedRequest = {
|
|
viewport: CultMeshViewportRequest;
|
|
selectedEntityIndex?: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeViewportFeedSnapshot = {
|
|
viewport: ViewportResponse;
|
|
selectedObject: SelectedObjectDocument | null;
|
|
inventory: InventoryDocument | null;
|
|
daemonHealth: DaemonHealthDocument;
|
|
authorityStatus: AuthorityStatusDocument;
|
|
starbridgeSession: StarbridgeSessionDocument;
|
|
assetManifest: AssetManifestDocument;
|
|
receivedAtUtc: string;
|
|
sampleMs: number;
|
|
};
|
|
|
|
export type AetheriaEveSurfaceRequest = {
|
|
surfaceId?: string;
|
|
recordKey?: string;
|
|
};
|
|
|
|
export type EveEmbeddedDocumentRequest = {
|
|
documentId: string;
|
|
schemaId?: string;
|
|
slotId?: string;
|
|
presentationKind?: string;
|
|
context?: Record<string, unknown>;
|
|
};
|
|
|
|
export type EveResolvedDocument = {
|
|
documentId: string;
|
|
schemaId: string;
|
|
document?: unknown;
|
|
surface?: AetheriaMenuSurfaceTree;
|
|
};
|
|
|
|
export type EveProviderAdvertisement = {
|
|
providerId: string;
|
|
title: string;
|
|
kind: string;
|
|
surfaces: Array<{
|
|
surfaceId: string;
|
|
key: string;
|
|
transport: string;
|
|
status: string;
|
|
}>;
|
|
};
|
|
|
|
export type AetheriaEveCommandRequest = {
|
|
providerId?: string;
|
|
surfaceId?: string;
|
|
command?: string;
|
|
clientId?: string;
|
|
issuedAtUtc?: string;
|
|
payload?: Record<string, unknown>;
|
|
};
|
|
|
|
export type AetheriaMenuSurfaceDocument = {
|
|
providerId: string;
|
|
providerKind: string;
|
|
title: string;
|
|
version: number;
|
|
updatedAtUtc: string;
|
|
surface: AetheriaMenuSurfaceTree;
|
|
commands: AetheriaMenuSurfaceCommand[];
|
|
};
|
|
|
|
export type AetheriaMenuSurfaceTree = {
|
|
id: string;
|
|
root: AetheriaMenuSurfaceComponent;
|
|
styles: AetheriaMenuStyleToken[];
|
|
};
|
|
|
|
export type AetheriaMenuSurfaceComponent = {
|
|
id: string;
|
|
kind: string;
|
|
props: Record<string, string>;
|
|
layout?: Record<string, string>;
|
|
style?: Record<string, string>;
|
|
embeddedDocuments?: AetheriaMenuEmbeddedDocumentSlot[];
|
|
children: AetheriaMenuSurfaceComponent[];
|
|
};
|
|
|
|
export type AetheriaMenuEmbeddedDocumentSlot = {
|
|
slotId: string;
|
|
documentId: string;
|
|
schemaId: string;
|
|
presentationKind: string;
|
|
};
|
|
|
|
export type AetheriaMenuStyleToken = {
|
|
name: string;
|
|
value: string;
|
|
};
|
|
|
|
export type AetheriaMenuSurfaceCommand = {
|
|
command: string;
|
|
label: string;
|
|
transport: string;
|
|
};
|
|
|
|
export type AetheriaRtsMainClient = {
|
|
mapViewport(request: CultMeshViewportRequest): Promise<ViewportResponse>;
|
|
objectsViewport(request: CultMeshViewportRequest): Promise<ObjectsViewportResponse>;
|
|
gravityViewport(request: CultMeshViewportRequest): Promise<GravityViewportResponse>;
|
|
renderSplatsViewport(request: CultMeshViewportRequest): Promise<RenderSplatsViewportResponse>;
|
|
selectedObject(request: AetheriaRuntimeSelectedObjectRequest): Promise<SelectedObjectDocument>;
|
|
inventory(request: AetheriaRuntimeSelectedObjectRequest): Promise<InventoryDocument>;
|
|
daemonHealth(): Promise<DaemonHealthDocument>;
|
|
authorityStatus(): Promise<AuthorityStatusDocument>;
|
|
starbridgeSession(): Promise<StarbridgeSessionDocument>;
|
|
assetManifest(): Promise<AssetManifestDocument>;
|
|
watchViewportFeed(request: AetheriaRuntimeViewportFeedRequest, callback: (snapshot: AetheriaRuntimeViewportFeedSnapshot) => void): CultMeshUnsubscribe;
|
|
setMoveVector(request: AetheriaRuntimeSetMoveVectorRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
|
|
setTarget(request: AetheriaRuntimeSetTargetRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
|
|
surfaceCatalogDiagnostics(): CultMeshSurfaceCatalogDiagnostic;
|
|
surfaceCatalogIndexDiagnostics(): CultMeshSurfaceCatalogIndexDiagnostic;
|
|
};
|
|
|
|
export type AetheriaRtsHealthProvider = () => unknown;
|
|
|
|
export function registerAetheriaRtsIpcHandlers(
|
|
ipcMain: IpcMain,
|
|
getClient: () => AetheriaRtsMainClient,
|
|
getHealth: AetheriaRtsHealthProvider,
|
|
): void {
|
|
const viewportFeedSubscriptions = new Map<string, CultMeshUnsubscribe>();
|
|
ipcMain.handle(AetheriaRtsIpcChannels.mapViewport, async (_event, request: CultMeshViewportRequest) =>
|
|
getClient().mapViewport(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.objectsViewport, async (_event, request: CultMeshViewportRequest) =>
|
|
getClient().objectsViewport(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.gravityViewport, async (_event, request: CultMeshViewportRequest) =>
|
|
getClient().gravityViewport(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.renderSplatsViewport, async (_event, request: CultMeshViewportRequest) =>
|
|
getClient().renderSplatsViewport(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.selectedObject, async (_event, request: AetheriaRuntimeSelectedObjectRequest) =>
|
|
getClient().selectedObject(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.inventory, async (_event, request: AetheriaRuntimeSelectedObjectRequest) =>
|
|
getClient().inventory(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.daemonHealth, async () => getClient().daemonHealth());
|
|
ipcMain.handle(AetheriaRtsIpcChannels.authorityStatus, async () => getClient().authorityStatus());
|
|
ipcMain.handle(AetheriaRtsIpcChannels.starbridgeSession, async () => getClient().starbridgeSession());
|
|
ipcMain.handle(AetheriaRtsIpcChannels.assetManifest, async () => getClient().assetManifest());
|
|
ipcMain.handle(AetheriaRtsIpcChannels.viewportFeed, async (event, request: { subscriptionId: string; feed: AetheriaRuntimeViewportFeedRequest }) => {
|
|
viewportFeedSubscriptions.get(request.subscriptionId)?.();
|
|
const unsubscribe = getClient().watchViewportFeed(request.feed, snapshot => {
|
|
event.sender.send(AetheriaRtsIpcChannels.viewportFeedUpdate, {
|
|
subscriptionId: request.subscriptionId,
|
|
snapshot,
|
|
});
|
|
});
|
|
viewportFeedSubscriptions.set(request.subscriptionId, unsubscribe);
|
|
});
|
|
ipcMain.handle(AetheriaRtsIpcChannels.viewportFeedStop, (_event, subscriptionId: string) => {
|
|
viewportFeedSubscriptions.get(subscriptionId)?.();
|
|
viewportFeedSubscriptions.delete(subscriptionId);
|
|
});
|
|
ipcMain.handle(AetheriaRtsIpcChannels.setMoveVector, async (_event, request: AetheriaRuntimeSetMoveVectorRequest) =>
|
|
getClient().setMoveVector(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.setTarget, async (_event, request: AetheriaRuntimeSetTargetRequest) =>
|
|
getClient().setTarget(request));
|
|
ipcMain.handle(AetheriaRtsIpcChannels.surfaceCatalog, () => getClient().surfaceCatalogDiagnostics());
|
|
ipcMain.handle(AetheriaRtsIpcChannels.surfaceCatalogIndex, () => getClient().surfaceCatalogIndexDiagnostics());
|
|
ipcMain.handle(AetheriaRtsIpcChannels.health, () => getHealth());
|
|
}
|
|
|
|
export type AetheriaRuntimeDaemonCommandSender = (
|
|
commandId: string,
|
|
issuedAtUtc: string,
|
|
command: unknown[],
|
|
context: CultMeshOperationContext,
|
|
) => Promise<void>;
|
|
|
|
export type AetheriaRuntimeViewportQueryExecutor<TResult> = (
|
|
request: CultMeshViewportRequest,
|
|
context: CultMeshQueryContext,
|
|
) => Promise<TResult>;
|
|
|
|
export type AetheriaRuntimeQueryExecutor<TParameters, TResult> = (
|
|
request: TParameters,
|
|
context: CultMeshQueryContext,
|
|
) => Promise<TResult>;
|
|
|
|
export type AetheriaRuntimeGameQueryExecutors = {
|
|
mapViewport: AetheriaRuntimeViewportQueryExecutor<ViewportResponse>;
|
|
objectsViewport: AetheriaRuntimeViewportQueryExecutor<ObjectsViewportResponse>;
|
|
gravityViewport: AetheriaRuntimeViewportQueryExecutor<GravityViewportResponse>;
|
|
renderSplatsViewport: AetheriaRuntimeViewportQueryExecutor<RenderSplatsViewportResponse>;
|
|
selectedObject: AetheriaRuntimeQueryExecutor<AetheriaRuntimeSelectedObjectRequest, SelectedObjectDocument>;
|
|
inventory: AetheriaRuntimeQueryExecutor<AetheriaRuntimeSelectedObjectRequest, InventoryDocument>;
|
|
daemonHealth: AetheriaRuntimeQueryExecutor<void, DaemonHealthDocument>;
|
|
authorityStatus: AetheriaRuntimeQueryExecutor<void, AuthorityStatusDocument>;
|
|
starbridgeSession: AetheriaRuntimeQueryExecutor<void, StarbridgeSessionDocument>;
|
|
assetManifest: AetheriaRuntimeQueryExecutor<void, AssetManifestDocument>;
|
|
};
|
|
|
|
export type AetheriaRuntimeGameQueryWatchers = Partial<{
|
|
mapViewport: CultMeshQueryWatcher<CultMeshViewportRequest, ViewportResponse>;
|
|
objectsViewport: CultMeshQueryWatcher<CultMeshViewportRequest, ObjectsViewportResponse>;
|
|
gravityViewport: CultMeshQueryWatcher<CultMeshViewportRequest, GravityViewportResponse>;
|
|
renderSplatsViewport: CultMeshQueryWatcher<CultMeshViewportRequest, RenderSplatsViewportResponse>;
|
|
selectedObject: CultMeshQueryWatcher<AetheriaRuntimeSelectedObjectRequest, SelectedObjectDocument>;
|
|
inventory: CultMeshQueryWatcher<AetheriaRuntimeSelectedObjectRequest, InventoryDocument>;
|
|
daemonHealth: CultMeshQueryWatcher<void, DaemonHealthDocument>;
|
|
authorityStatus: CultMeshQueryWatcher<void, AuthorityStatusDocument>;
|
|
starbridgeSession: CultMeshQueryWatcher<void, StarbridgeSessionDocument>;
|
|
assetManifest: CultMeshQueryWatcher<void, AssetManifestDocument>;
|
|
}>;
|
|
|
|
export type AetheriaRuntimeGameQueryDiagnostic = CultMeshQuerySurfaceDiagnostic;
|
|
|
|
export type AetheriaRuntimeGameLiveFeedDiagnostic = CultMeshLiveFeedDiagnostic;
|
|
|
|
export type AetheriaRuntimeGameSurfaceCatalogDiagnostic = CultMeshSurfaceCatalogDiagnostic;
|
|
|
|
export type AetheriaRuntimeGameOperationHandles = ReturnType<typeof createAetheriaRuntimeGameOperationHandles>;
|
|
|
|
export type AetheriaRuntimeGameDocuments = ReturnType<typeof createAetheriaRuntimeGameDocuments>;
|
|
|
|
export type AetheriaRuntimeGameStatePointers = AetheriaRuntimeGameDocuments;
|
|
|
|
export type AetheriaRuntimeGameDocumentResolvers = Partial<{
|
|
daemonFrame: (context: CultMeshQueryContext) => Promise<unknown>;
|
|
daemonHealth: (context: CultMeshQueryContext) => Promise<unknown>;
|
|
authorityPolicy: (context: CultMeshQueryContext) => Promise<unknown>;
|
|
starbridgeSession: (context: CultMeshQueryContext) => Promise<unknown>;
|
|
assetManifest: (context: CultMeshQueryContext) => Promise<unknown>;
|
|
}>;
|
|
|
|
export type AetheriaRuntimeGameStatePointerResolvers = AetheriaRuntimeGameDocumentResolvers;
|
|
|
|
export const AetheriaRuntimeGameDocumentSources = {
|
|
daemonFrame: CultMesh.querySource("daemon:aetheria.frame.latest.v1", {
|
|
schemaId: AetheriaRtsSchemas.daemonFrame,
|
|
description: "latest daemon frame"
|
|
}),
|
|
daemonHealth: CultMesh.querySource("daemon:aetheria.health.latest.v1", {
|
|
schemaId: AetheriaRtsSchemas.daemonHealth,
|
|
description: "latest daemon health"
|
|
}),
|
|
authorityPolicy: CultMesh.querySource("daemon:aetheria.authority.policy.latest.v1", {
|
|
schemaId: AetheriaRtsSchemas.verseAuthorityPolicy,
|
|
description: "latest Verse authority policy"
|
|
}),
|
|
starbridgeSession: CultMesh.querySource("daemon:aetheria.starbridge.session.latest.v1", {
|
|
schemaId: AetheriaRtsSchemas.starbridgeSessionSummary,
|
|
description: "latest Starbridge session summary"
|
|
}),
|
|
assetManifest: CultMesh.querySource("daemon:aetheria.asset_manifest.latest.v1", {
|
|
schemaId: AetheriaRtsSchemas.assetManifest,
|
|
description: "latest daemon asset manifest"
|
|
})
|
|
} as const;
|
|
|
|
export function createAetheriaRuntimeGameDocuments(
|
|
routeHint: CultMeshRouteHint = CultMesh.routeHint(),
|
|
resolvers: AetheriaRuntimeGameDocumentResolvers = {},
|
|
) {
|
|
return {
|
|
daemonFrame: CultMesh.document(
|
|
AetheriaRuntimeGameDocumentSources.daemonFrame.sourceId,
|
|
{ schemaId: AetheriaRtsSchemas.daemonFrame },
|
|
async (context) => resolvers.daemonFrame?.(context),
|
|
{
|
|
routeHint,
|
|
sources: [AetheriaRuntimeGameDocumentSources.daemonFrame],
|
|
},
|
|
),
|
|
daemonHealth: CultMesh.document(
|
|
AetheriaRuntimeGameDocumentSources.daemonHealth.sourceId,
|
|
{ schemaId: AetheriaRtsSchemas.daemonHealth },
|
|
async (context) => resolvers.daemonHealth?.(context),
|
|
{
|
|
routeHint,
|
|
sources: [AetheriaRuntimeGameDocumentSources.daemonHealth],
|
|
},
|
|
),
|
|
authorityPolicy: CultMesh.document(
|
|
AetheriaRuntimeGameDocumentSources.authorityPolicy.sourceId,
|
|
{ schemaId: AetheriaRtsSchemas.verseAuthorityPolicy },
|
|
async (context) => resolvers.authorityPolicy?.(context),
|
|
{
|
|
routeHint,
|
|
sources: [AetheriaRuntimeGameDocumentSources.authorityPolicy],
|
|
},
|
|
),
|
|
starbridgeSession: CultMesh.document(
|
|
AetheriaRuntimeGameDocumentSources.starbridgeSession.sourceId,
|
|
{ schemaId: AetheriaRtsSchemas.starbridgeSessionSummary },
|
|
async (context) => resolvers.starbridgeSession?.(context),
|
|
{
|
|
routeHint,
|
|
sources: [AetheriaRuntimeGameDocumentSources.starbridgeSession],
|
|
},
|
|
),
|
|
assetManifest: CultMesh.document(
|
|
AetheriaRuntimeGameDocumentSources.assetManifest.sourceId,
|
|
{ schemaId: AetheriaRtsSchemas.assetManifest },
|
|
async (context) => resolvers.assetManifest?.(context),
|
|
{
|
|
routeHint,
|
|
sources: [AetheriaRuntimeGameDocumentSources.assetManifest],
|
|
},
|
|
),
|
|
} as const;
|
|
}
|
|
|
|
export const createAetheriaRuntimeGameStatePointers = createAetheriaRuntimeGameDocuments;
|
|
|
|
export function createAetheriaRuntimeGameQueryHandles(
|
|
executors: AetheriaRuntimeGameQueryExecutors,
|
|
routeHint: CultMeshRouteHint = CultMesh.routeHint(),
|
|
watchers: AetheriaRuntimeGameQueryWatchers = {},
|
|
) {
|
|
return {
|
|
mapViewport: CultMesh.query<CultMeshViewportRequest, ViewportResponse>(
|
|
AetheriaRtsSchemas.gameViewport,
|
|
executors.mapViewport,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.daemonFrame], watchQuery: watchers.mapViewport },
|
|
),
|
|
objectsViewport: CultMesh.query<CultMeshViewportRequest, ObjectsViewportResponse>(
|
|
AetheriaRtsSchemas.objectsViewport,
|
|
executors.objectsViewport,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.daemonFrame], watchQuery: watchers.objectsViewport },
|
|
),
|
|
gravityViewport: CultMesh.query<CultMeshViewportRequest, GravityViewportResponse>(
|
|
AetheriaRtsSchemas.gravityViewport,
|
|
executors.gravityViewport,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.daemonFrame], watchQuery: watchers.gravityViewport },
|
|
),
|
|
renderSplatsViewport: CultMesh.query<CultMeshViewportRequest, RenderSplatsViewportResponse>(
|
|
AetheriaRtsSchemas.renderSplatsViewport,
|
|
executors.renderSplatsViewport,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.daemonFrame], watchQuery: watchers.renderSplatsViewport },
|
|
),
|
|
selectedObject: CultMesh.query<AetheriaRuntimeSelectedObjectRequest, SelectedObjectDocument>(
|
|
AetheriaRtsSchemas.selectedObject,
|
|
executors.selectedObject,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.daemonFrame], watchQuery: watchers.selectedObject },
|
|
),
|
|
inventory: CultMesh.query<AetheriaRuntimeSelectedObjectRequest, InventoryDocument>(
|
|
AetheriaRtsSchemas.inventory,
|
|
executors.inventory,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.daemonFrame], watchQuery: watchers.inventory },
|
|
),
|
|
daemonHealth: CultMesh.query<void, DaemonHealthDocument>(
|
|
AetheriaRtsSchemas.daemonHealth,
|
|
executors.daemonHealth,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.daemonHealth], watchQuery: watchers.daemonHealth },
|
|
),
|
|
authorityStatus: CultMesh.query<void, AuthorityStatusDocument>(
|
|
AetheriaRtsSchemas.verseAuthorityPolicy,
|
|
executors.authorityStatus,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.authorityPolicy], watchQuery: watchers.authorityStatus },
|
|
),
|
|
starbridgeSession: CultMesh.query<void, StarbridgeSessionDocument>(
|
|
AetheriaRtsSchemas.starbridgeSessionSummary,
|
|
executors.starbridgeSession,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.starbridgeSession], watchQuery: watchers.starbridgeSession },
|
|
),
|
|
assetManifest: CultMesh.query<void, AssetManifestDocument>(
|
|
AetheriaRtsSchemas.assetManifest,
|
|
executors.assetManifest,
|
|
{ routeHint, sources: [AetheriaRuntimeGameDocumentSources.assetManifest], watchQuery: watchers.assetManifest },
|
|
),
|
|
} as const;
|
|
}
|
|
|
|
export function describeAetheriaRuntimeGameQueryHandles(
|
|
handles: ReturnType<typeof createAetheriaRuntimeGameQueryHandles>,
|
|
) {
|
|
return {
|
|
mapViewport: describeAetheriaRuntimeGameQuerySurface(handles.mapViewport),
|
|
objectsViewport: describeAetheriaRuntimeGameQuerySurface(handles.objectsViewport),
|
|
gravityViewport: describeAetheriaRuntimeGameQuerySurface(handles.gravityViewport),
|
|
renderSplatsViewport: describeAetheriaRuntimeGameQuerySurface(handles.renderSplatsViewport),
|
|
selectedObject: describeAetheriaRuntimeGameQuerySurface(handles.selectedObject),
|
|
inventory: describeAetheriaRuntimeGameQuerySurface(handles.inventory),
|
|
daemonHealth: describeAetheriaRuntimeGameQuerySurface(handles.daemonHealth),
|
|
authorityStatus: describeAetheriaRuntimeGameQuerySurface(handles.authorityStatus),
|
|
starbridgeSession: describeAetheriaRuntimeGameQuerySurface(handles.starbridgeSession),
|
|
assetManifest: describeAetheriaRuntimeGameQuerySurface(handles.assetManifest),
|
|
} as const;
|
|
}
|
|
|
|
export function describeAetheriaRuntimeGameSurfaceCatalog(
|
|
handles: ReturnType<typeof createAetheriaRuntimeGameQueryHandles>,
|
|
operations?: AetheriaRuntimeGameOperationHandles,
|
|
documents: AetheriaRuntimeGameDocuments = createAetheriaRuntimeGameDocuments(),
|
|
): AetheriaRuntimeGameSurfaceCatalogDiagnostic {
|
|
return CultMesh.describeSurfaceCatalog(
|
|
"gamecult.aetheria.surfaces.v1",
|
|
[
|
|
CultMesh.describeSurface(documents.daemonFrame),
|
|
CultMesh.describeSurface(documents.daemonHealth),
|
|
CultMesh.describeSurface(documents.authorityPolicy),
|
|
CultMesh.describeSurface(documents.starbridgeSession),
|
|
CultMesh.describeSurface(documents.assetManifest),
|
|
CultMesh.describeSurface(handles.mapViewport),
|
|
CultMesh.describeSurface(handles.objectsViewport),
|
|
CultMesh.describeSurface(handles.gravityViewport),
|
|
CultMesh.describeSurface(handles.renderSplatsViewport),
|
|
CultMesh.describeSurface(handles.selectedObject),
|
|
CultMesh.describeSurface(handles.inventory),
|
|
CultMesh.describeSurface(handles.daemonHealth),
|
|
CultMesh.describeSurface(handles.authorityStatus),
|
|
CultMesh.describeSurface(handles.starbridgeSession),
|
|
CultMesh.describeSurface(handles.assetManifest),
|
|
...(operations
|
|
? [
|
|
CultMesh.describeSurface(operations.setMoveVector),
|
|
CultMesh.describeSurface(operations.setTarget),
|
|
]
|
|
: []),
|
|
],
|
|
);
|
|
}
|
|
|
|
function describeAetheriaRuntimeGameQuerySurface(surface: {
|
|
queryId: string;
|
|
routeHint: CultMeshRouteHint;
|
|
sources: readonly CultMeshQuerySource[];
|
|
}): AetheriaRuntimeGameQueryDiagnostic {
|
|
return CultMesh.describeQuerySurface(surface);
|
|
}
|
|
|
|
export function describeAetheriaRuntimeGameLiveFeedSurface(surface: {
|
|
feedId: string;
|
|
routeHint: CultMeshRouteHint;
|
|
sources: readonly CultMeshQuerySource[];
|
|
}): AetheriaRuntimeGameLiveFeedDiagnostic {
|
|
return CultMesh.describeLiveFeed(surface);
|
|
}
|
|
|
|
export function createAetheriaRuntimeGameOperationHandles(
|
|
sendCommand: AetheriaRuntimeDaemonCommandSender,
|
|
createCommandId: () => string = createDefaultCommandId,
|
|
) {
|
|
return {
|
|
setMoveVector: CultMesh.operation<AetheriaRuntimeSetMoveVectorRequest, AetheriaRuntimeDaemonCommandReceipt>(
|
|
"gamecult.aetheria.pilot.set_move_vector.v1",
|
|
async (request, context) => {
|
|
const commandId = context.idempotencyKey ?? createCommandId();
|
|
const issuedAtUtc = new Date().toISOString();
|
|
await sendCommand(
|
|
commandId,
|
|
issuedAtUtc,
|
|
encodeSetMoveVectorCommand(commandId, issuedAtUtc, context.runtimeId, request),
|
|
context,
|
|
);
|
|
return {
|
|
commandId,
|
|
...CultMesh.operationReceipt("gamecult.aetheria.pilot.set_move_vector.v1", true, { route: context.routeHint }),
|
|
};
|
|
},
|
|
),
|
|
setTarget: CultMesh.operation<AetheriaRuntimeSetTargetRequest, AetheriaRuntimeDaemonCommandReceipt>(
|
|
"gamecult.aetheria.pilot.set_target.v1",
|
|
async (request, context) => {
|
|
const commandId = context.idempotencyKey ?? createCommandId();
|
|
const issuedAtUtc = new Date().toISOString();
|
|
await sendCommand(
|
|
commandId,
|
|
issuedAtUtc,
|
|
encodeSetTargetCommand(commandId, issuedAtUtc, context.runtimeId, request),
|
|
context,
|
|
);
|
|
return {
|
|
commandId,
|
|
...CultMesh.operationReceipt("gamecult.aetheria.pilot.set_target.v1", true, { route: context.routeHint }),
|
|
};
|
|
},
|
|
),
|
|
} as const;
|
|
}
|
|
|
|
export type AetheriaRuntimeGameVerseHandles = ReturnType<typeof createAetheriaRuntimeGameVerseHandles>;
|
|
|
|
export function createAetheriaRuntimeGameVerseHandles(
|
|
queryVerse: CultMeshVerseContext,
|
|
commandVerse: CultMeshVerseContext,
|
|
queries: ReturnType<typeof createAetheriaRuntimeGameQueryHandles>,
|
|
operations: AetheriaRuntimeGameOperationHandles,
|
|
documents: AetheriaRuntimeGameDocuments = createAetheriaRuntimeGameDocuments(),
|
|
) {
|
|
const mapViewport = CultMesh.bindQuery(queryVerse, queries.mapViewport);
|
|
const objectsViewport = CultMesh.bindQuery(queryVerse, queries.objectsViewport);
|
|
const gravityViewport = CultMesh.bindQuery(queryVerse, queries.gravityViewport);
|
|
const renderSplatsViewport = CultMesh.bindQuery(queryVerse, queries.renderSplatsViewport);
|
|
const selectedObject = CultMesh.bindQuery(queryVerse, queries.selectedObject);
|
|
const inventory = CultMesh.bindQuery(queryVerse, queries.inventory);
|
|
const daemonHealth = CultMesh.bindQuery(queryVerse, queries.daemonHealth);
|
|
const authorityStatus = CultMesh.bindQuery(queryVerse, queries.authorityStatus);
|
|
const starbridgeSession = CultMesh.bindQuery(queryVerse, queries.starbridgeSession);
|
|
const assetManifest = CultMesh.bindQuery(queryVerse, queries.assetManifest);
|
|
const daemonFrameDocument = CultMesh.bindDocument(queryVerse, documents.daemonFrame);
|
|
const daemonHealthDocument = CultMesh.bindDocument(queryVerse, documents.daemonHealth);
|
|
const authorityPolicyDocument = CultMesh.bindDocument(queryVerse, documents.authorityPolicy);
|
|
const starbridgeSessionDocument = CultMesh.bindDocument(queryVerse, documents.starbridgeSession);
|
|
const assetManifestDocument = CultMesh.bindDocument(queryVerse, documents.assetManifest);
|
|
const setMoveVector = CultMesh.bindOperation(commandVerse, operations.setMoveVector);
|
|
const setTarget = CultMesh.bindOperation(commandVerse, operations.setTarget);
|
|
|
|
return {
|
|
zone: (_zoneId = "current") => ({
|
|
viewport: {
|
|
within: (request: CultMeshViewportRequest) =>
|
|
mapViewport.execute(request),
|
|
watch: (
|
|
request: CultMeshViewportRequest,
|
|
callback: (value: ViewportResponse) => void,
|
|
) => mapViewport.watch(request, callback),
|
|
},
|
|
objects: {
|
|
visibleWithin: (request: CultMeshViewportRequest) =>
|
|
objectsViewport.execute(request),
|
|
watchVisibleWithin: (
|
|
request: CultMeshViewportRequest,
|
|
callback: (value: ObjectsViewportResponse) => void,
|
|
) => objectsViewport.watch(request, callback),
|
|
},
|
|
gravity: {
|
|
within: (request: CultMeshViewportRequest) =>
|
|
gravityViewport.execute(request),
|
|
watchWithin: (
|
|
request: CultMeshViewportRequest,
|
|
callback: (value: GravityViewportResponse) => void,
|
|
) => gravityViewport.watch(request, callback),
|
|
},
|
|
renderSplats: {
|
|
within: (request: CultMeshViewportRequest) =>
|
|
renderSplatsViewport.execute(request),
|
|
watchWithin: (
|
|
request: CultMeshViewportRequest,
|
|
callback: (value: RenderSplatsViewportResponse) => void,
|
|
) => renderSplatsViewport.watch(request, callback),
|
|
},
|
|
}),
|
|
entity: (entityKey: string) => ({
|
|
pilot: {
|
|
move: (
|
|
direction: { readonly x: number; readonly y: number },
|
|
options: { scalar?: number; observedFrameId?: number; commandId?: string } = {},
|
|
) => setMoveVector.invoke({
|
|
actorEntityKey: entityKey,
|
|
directionX: direction.x,
|
|
directionY: direction.y,
|
|
scalar: options.scalar ?? 1,
|
|
observedFrameId: options.observedFrameId,
|
|
}, { idempotencyKey: options.commandId }),
|
|
target: (
|
|
targetEntityKey: string,
|
|
options: { observedFrameId?: number; commandId?: string } = {},
|
|
) => setTarget.invoke({
|
|
actorEntityKey: entityKey,
|
|
targetEntityKey,
|
|
observedFrameId: options.observedFrameId,
|
|
}, { idempotencyKey: options.commandId }),
|
|
},
|
|
}),
|
|
selectedObject: (entityIndex: number) =>
|
|
selectedObject.execute({ entityIndex }),
|
|
inventory: (entityIndex: number) =>
|
|
inventory.execute({ entityIndex }),
|
|
daemon: {
|
|
state: {
|
|
frame: () => daemonFrameDocument.latest(),
|
|
health: () => daemonHealthDocument.latest(),
|
|
authorityPolicy: () => authorityPolicyDocument.latest(),
|
|
starbridgeSession: () => starbridgeSessionDocument.latest(),
|
|
assetManifest: () => assetManifestDocument.latest(),
|
|
},
|
|
health: () => daemonHealth.execute(undefined),
|
|
authorityStatus: () => authorityStatus.execute(undefined),
|
|
starbridgeSession: () => starbridgeSession.execute(undefined),
|
|
assetManifest: () => assetManifest.execute(undefined),
|
|
},
|
|
} as const;
|
|
}
|
|
|
|
export function encodeSetMoveVectorCommand(
|
|
commandId: string,
|
|
issuedAtUtc: string,
|
|
runtimeId: string,
|
|
request: AetheriaRuntimeSetMoveVectorRequest,
|
|
): unknown[] {
|
|
const command = createBaseCommand(commandId, issuedAtUtc, runtimeId, request.actorEntityKey, request.observedFrameId);
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.kind] = AetheriaRuntimeDaemonCommandKinds.setMoveVector;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.directionX] = request.directionX;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.directionY] = request.directionY;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.scalarValue] = Math.min(1, Math.max(0, request.scalar));
|
|
return command;
|
|
}
|
|
|
|
export function encodeSetTargetCommand(
|
|
commandId: string,
|
|
issuedAtUtc: string,
|
|
runtimeId: string,
|
|
request: AetheriaRuntimeSetTargetRequest,
|
|
): unknown[] {
|
|
const command = createBaseCommand(commandId, issuedAtUtc, runtimeId, request.actorEntityKey, request.observedFrameId);
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.kind] = AetheriaRuntimeDaemonCommandKinds.setTarget;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.targetEntityKey] = request.targetEntityKey;
|
|
return command;
|
|
}
|
|
|
|
function createBaseCommand(
|
|
commandId: string,
|
|
issuedAtUtc: string,
|
|
runtimeId: string,
|
|
actorEntityKey: string,
|
|
observedFrameId?: number,
|
|
): unknown[] {
|
|
const command = new Array<unknown>(Object.keys(aetheriaRuntimeDaemonCommandDocumentSlots).length).fill(null);
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.schema] = AetheriaRtsSchemas.daemonCommand;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.commandId] = commandId;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.clientId] = runtimeId;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.issuedAtUtc] = issuedAtUtc;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.sessionId] = "local";
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.observedFrameId] = observedFrameId ?? -1;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.kind] = 0;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.actorEntityKey] = actorEntityKey;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.targetEntityKey] = "";
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.targetZoneIndex] = -1;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.equipmentIndex] = -1;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.behaviorIndex] = -1;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.weaponGroup] = -1;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.positionX] = 0;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.positionY] = 0;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.positionZ] = 0;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.directionX] = 0;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.directionY] = 0;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.scalarValue] = 0;
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.textValue] = "";
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.authorRuntimeId] = "";
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.subjectKey] = "";
|
|
command[aetheriaRuntimeDaemonCommandDocumentSlots.claimKind] = "";
|
|
return command;
|
|
}
|
|
|
|
function createDefaultCommandId(): string {
|
|
const cryptoApi = globalThis.crypto as { randomUUID?: () => string } | undefined;
|
|
return cryptoApi?.randomUUID?.() ?? `command-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
}
|