Use daemon frame document for commands

This commit is contained in:
Meta Vens 2026-06-29 02:56:43 +01:00
commit 00869a7acc
6 changed files with 192 additions and 193 deletions

View file

@ -3285,7 +3285,7 @@ static void RequireEveRuntimeBootstrap(string root)
"EveSurfaceCommandRequest request",
"request.ProviderId, \"aetheria.daemon\"",
"AetheriaClient",
"client.CurrentObservedDaemon()",
"client.CurrentDaemonFrame()",
"new AetheriaRuntimeDaemonOperationClient(",
"AetheriaRuntimeDaemonSurfaceCommandCatalog.TrySubmitArgumentless(",
"AetheriaRuntimeDaemonSurfaceCommandCatalog.CommandPrefix"
@ -3304,6 +3304,7 @@ static void RequireEveRuntimeBootstrap(string root)
daemonSurfaceCommands.Contains("client.State.ReactiveDaemonFrame()", StringComparison.Ordinal) ||
daemonSurfaceCommands.Contains("TryReactiveDaemonSoaView(client)", StringComparison.Ordinal) ||
daemonSurfaceCommands.Contains("client.State.ReactiveZoneRender()", StringComparison.Ordinal) ||
daemonSurfaceCommands.Contains("client.CurrentObservedDaemon()", StringComparison.Ordinal) ||
daemonSurfaceCommands.Contains("client.State.CurrentObservedDaemon()", StringComparison.Ordinal) ||
daemonSurfaceCommands.Contains("client.State.ReactiveObservedDaemon()", StringComparison.Ordinal) ||
daemonSurfaceCommands.Contains("observedState.TryCurrent(out var current)", StringComparison.Ordinal))
@ -10059,9 +10060,9 @@ static void RequireTypedDaemonCommandPayloads(string root)
"ClientId = string.IsNullOrWhiteSpace(clientId) ? DefaultClientId : clientId",
"private AetheriaRuntimeDaemonCommandEnvelope Send(AetheriaRuntimeDaemonCommandDocument command)",
"ReadObservedDaemonCommands()",
"Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeObservedDaemonState?, AetheriaRuntimeDaemonCommandEnvelope> submit",
"return Submit((client, observed) => client.SetTarget(observed, targetEntityKey));",
"return Send((client, observed) => client.TransferCargoItem(",
"Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeDaemonFrameDocument?, AetheriaRuntimeDaemonCommandEnvelope> submit",
"return Submit((client, frame) => client.SetTarget(frame, targetEntityKey));",
"return Send((client, frame) => client.TransferCargoItem(",
"command.CargoTransfer.OriginEntityKey",
"command.TradePurchase.TotalPrice",
"command.LootPickup.ItemKey",
@ -11372,7 +11373,7 @@ static void RequireDaemonVersePublication(string root)
"public static IReadOnlyList<AetheriaRuntimeDaemonCommandKinds> ArgumentlessCommands",
"public static bool IsArgumentlessCommand(",
"internal static bool TrySubmitArgumentless(",
"AetheriaRuntimeDaemonCommandKinds.SensorPing => client.SensorPing(observed)"
"AetheriaRuntimeDaemonCommandKinds.SensorPing => client.SensorPing(frame)"
};
var missingSurfaceCommandCatalogSymbols = requiredSurfaceCommandCatalogSymbols
.Where(symbol => !daemonSurfaceCommandCatalog.Contains(symbol, StringComparison.Ordinal))
@ -16044,10 +16045,10 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
!observedDaemonState.Contains("CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument> zoneRender", StringComparison.Ordinal) ||
!observedDaemonState.Contains("var currentZoneRender = zoneRender?.Current;", StringComparison.Ordinal) ||
!observedDaemonState.Contains("new AetheriaRuntimeObservedDaemonState(currentFrame, currentSoaView, currentZoneRender)", StringComparison.Ordinal) ||
!aetheriaClient.Contains("private CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument>? _observedFrame;", StringComparison.Ordinal) ||
!aetheriaClient.Contains("private CultMeshReactiveDocument<AetheriaRuntimeDaemonSoaViewDocument>? _observedSoaView;", StringComparison.Ordinal) ||
!aetheriaClient.Contains("private CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument>? _observedZoneRender;", StringComparison.Ordinal) ||
!aetheriaClient.Contains("AetheriaRuntimeObservedDaemonState.TryCreateCurrent(", StringComparison.Ordinal))
!daemonObserver.Contains("private CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument> _daemonFrame;", StringComparison.Ordinal) ||
!daemonObserver.Contains("private CultMeshReactiveDocument<AetheriaRuntimeDaemonSoaViewDocument> _daemonSoaView;", StringComparison.Ordinal) ||
!daemonObserver.Contains("private CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument> _zoneRender;", StringComparison.Ordinal) ||
!daemonObserver.Contains("AetheriaRuntimeObservedDaemonState.TryCreateCurrent(", StringComparison.Ordinal))
{
throw new InvalidOperationException(
"Observed zone-render state acquisition must sample managed typed zone-render documents directly.");
@ -16100,7 +16101,9 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
var requiredManagedClientConnectionSymbols = new[]
{
"public AetheriaClientState State => _state;",
"var observed = CurrentObservedDaemon();"
"var frame = CurrentDaemonFrame();",
"private CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument>? _daemonFrame;",
"_daemonFrame ??= State.Document<AetheriaRuntimeDaemonFrameDocument>().Reactive();"
};
var missingManagedClientConnectionSymbols = requiredManagedClientConnectionSymbols
.Where(symbol => !aetheriaClient.Contains(symbol, StringComparison.Ordinal))
@ -16115,9 +16118,12 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
if (aetheriaClient.Contains("State.ReactiveDaemonFrame()", StringComparison.Ordinal) ||
aetheriaClient.Contains("TryReactiveDaemonSoaView()", StringComparison.Ordinal) ||
aetheriaClient.Contains("State.ReactiveZoneRender()", StringComparison.Ordinal) ||
aetheriaClient.Contains("CurrentObservedDaemon()", StringComparison.Ordinal) ||
aetheriaClient.Contains("State.CurrentObservedDaemon()", StringComparison.Ordinal) ||
aetheriaClient.Contains("State.ReactiveObservedDaemon()", StringComparison.Ordinal) ||
aetheriaClient.Contains("Aetheria() => State", StringComparison.Ordinal) ||
aetheriaClient.Contains("AetheriaRuntimeObservedDaemonState.TryCreateCurrent(", StringComparison.Ordinal) ||
aetheriaClient.Contains("AetheriaRuntimeObservedDaemonState?", StringComparison.Ordinal) ||
aetheriaClient.Contains("observedState.TryCurrent(out var current)", StringComparison.Ordinal))
{
throw new InvalidOperationException(
@ -16161,24 +16167,22 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
"AetheriaClientState must not expose one-shot observed daemon aggregation; command owners should hold managed typed daemon documents.");
}
var requiredManagedObservedDaemonSymbols = new[]
var requiredManagedCommandFrameSymbols = new[]
{
"private CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument>? _observedFrame;",
"private CultMeshReactiveDocument<AetheriaRuntimeDaemonSoaViewDocument>? _observedSoaView;",
"private CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument>? _observedZoneRender;",
"_observedFrame ??= State.Document<AetheriaRuntimeDaemonFrameDocument>().Reactive();",
"_observedSoaView ??= State.Document<AetheriaRuntimeDaemonSoaViewDocument>().Reactive();",
"_observedZoneRender ??= State.Document<AetheriaRuntimeZoneRenderDocument>().Reactive();",
"AetheriaRuntimeObservedDaemonState.TryCreateCurrent("
"internal AetheriaRuntimeDaemonFrameDocument? CurrentDaemonFrame()",
"_daemonFrame ??= State.Document<AetheriaRuntimeDaemonFrameDocument>().Reactive();",
"return _daemonFrame.Current;",
"Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeDaemonFrameDocument?, AetheriaRuntimeDaemonCommandEnvelope> submit",
"frame?.SessionId ?? _sessionId"
};
var missingManagedObservedDaemonSymbols = requiredManagedObservedDaemonSymbols
var missingManagedCommandFrameSymbols = requiredManagedCommandFrameSymbols
.Where(symbol => !aetheriaClient.Contains(symbol, StringComparison.Ordinal))
.ToArray();
if (missingManagedObservedDaemonSymbols.Length > 0)
if (missingManagedCommandFrameSymbols.Length > 0)
{
throw new InvalidOperationException(
"AetheriaClient must compose current observed daemon state from owned managed reactive typed documents: " +
string.Join(", ", missingManagedObservedDaemonSymbols));
"AetheriaClient command submission must sample only the managed daemon frame document instead of composing an observed render aggregate: " +
string.Join(", ", missingManagedCommandFrameSymbols));
}
if (!daemonRuntimeDocumentTests.Contains("ManagedStateSamplesCurrentObservedDaemonFromReactiveDocuments()", StringComparison.Ordinal) ||

View file

@ -17,9 +17,7 @@ namespace GameCult.Aetheria.State.Verse
private readonly AetheriaControl _control;
private readonly AetheriaUi _ui;
private readonly AetheriaClientState _state;
private CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument>? _observedFrame;
private CultMeshReactiveDocument<AetheriaRuntimeDaemonSoaViewDocument>? _observedSoaView;
private CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument>? _observedZoneRender;
private CultMeshReactiveDocument<AetheriaRuntimeDaemonFrameDocument>? _daemonFrame;
private bool _disposed;
private AetheriaClient(AetheriaRuntimeVerseClient verse, string clientId, string sessionId)
@ -154,44 +152,41 @@ namespace GameCult.Aetheria.State.Verse
return;
_disposed = true;
_observedFrame?.Dispose();
_observedSoaView?.Dispose();
_observedZoneRender?.Dispose();
_daemonFrame?.Dispose();
_verse.Dispose();
}
private AetheriaRuntimeDaemonCommandEnvelope SendOperation(
Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeObservedDaemonState?, AetheriaRuntimeDaemonCommandEnvelope> submit)
Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeDaemonFrameDocument?, AetheriaRuntimeDaemonCommandEnvelope> submit)
{
ThrowIfDisposed();
if (submit == null) throw new ArgumentNullException(nameof(submit));
var observed = CurrentObservedDaemon();
var frame = CurrentDaemonFrame();
var operationClient = new AetheriaRuntimeDaemonOperationClient(
StatePath,
_clientId,
observed?.Frame.SessionId ?? _sessionId,
frame?.SessionId ?? _sessionId,
command => _verse
.SubmitDaemonCommandAsync(command)
.GetAwaiter()
.GetResult());
return submit(operationClient, observed);
return submit(operationClient, frame);
}
internal AetheriaRuntimeObservedDaemonState? CurrentObservedDaemon()
internal AetheriaRuntimeDaemonFrameDocument? CurrentDaemonFrame()
{
ThrowIfDisposed();
_observedFrame ??= State.Document<AetheriaRuntimeDaemonFrameDocument>().Reactive();
_observedSoaView ??= State.Document<AetheriaRuntimeDaemonSoaViewDocument>().Reactive();
_observedZoneRender ??= State.Document<AetheriaRuntimeZoneRenderDocument>().Reactive();
return AetheriaRuntimeObservedDaemonState.TryCreateCurrent(
_observedFrame,
_observedSoaView,
_observedZoneRender,
out var current)
? current
: null;
try
{
_daemonFrame ??= State.Document<AetheriaRuntimeDaemonFrameDocument>().Reactive();
return _daemonFrame.Current;
}
catch
{
return null;
}
}
private void ThrowIfDisposed()

View file

@ -77,14 +77,14 @@ namespace GameCult.Aetheria.State.Verse
private AetheriaRuntimeDaemonCommandDocument Create(
AetheriaRuntimeDaemonCommandKinds kind,
AetheriaRuntimeObservedDaemonState? observed)
AetheriaRuntimeDaemonFrameDocument? frame)
{
return AetheriaRuntimeDaemonCommandDocument.Create(
kind,
ClientId,
observed?.Frame.SessionId ?? SessionId,
observed?.Frame.FrameId ?? -1,
observed?.Run.CurrentEntityKey ?? "");
frame?.SessionId ?? SessionId,
frame?.FrameId ?? -1,
frame?.Run.CurrentEntityKey ?? "");
}
internal static AetheriaRuntimeDaemonCommandEnvelope ToEnvelope(AetheriaRuntimeDaemonCommandDocument command)
@ -102,41 +102,41 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetTarget(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetTarget, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetTarget, frame);
command.TargetEntityKey = targetEntityKey ?? "";
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope ClearTarget(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope ClearTarget(AetheriaRuntimeDaemonFrameDocument? frame)
{
return Send(Create(AetheriaRuntimeDaemonCommandKinds.ClearTarget, observed));
return Send(Create(AetheriaRuntimeDaemonCommandKinds.ClearTarget, frame));
}
internal AetheriaRuntimeDaemonCommandEnvelope TargetNearest(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope TargetNearest(AetheriaRuntimeDaemonFrameDocument? frame)
{
return Send(Create(AetheriaRuntimeDaemonCommandKinds.TargetNearest, observed));
return Send(Create(AetheriaRuntimeDaemonCommandKinds.TargetNearest, frame));
}
internal AetheriaRuntimeDaemonCommandEnvelope TargetNext(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope TargetNext(AetheriaRuntimeDaemonFrameDocument? frame)
{
return Send(Create(AetheriaRuntimeDaemonCommandKinds.TargetNext, observed));
return Send(Create(AetheriaRuntimeDaemonCommandKinds.TargetNext, frame));
}
internal AetheriaRuntimeDaemonCommandEnvelope TargetPrevious(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope TargetPrevious(AetheriaRuntimeDaemonFrameDocument? frame)
{
return Send(Create(AetheriaRuntimeDaemonCommandKinds.TargetPrevious, observed));
return Send(Create(AetheriaRuntimeDaemonCommandKinds.TargetPrevious, frame));
}
internal AetheriaRuntimeDaemonCommandEnvelope TargetReticle(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
double directionX,
double directionY,
double directionZ)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.TargetReticle, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.TargetReticle, frame);
command.DirectionX = directionX;
command.DirectionY = directionY;
command.PositionZ = directionZ;
@ -144,12 +144,12 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetMoveVector(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
double directionX,
double directionY,
double scalarValue = 1.0)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetMoveVector, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetMoveVector, frame);
command.DirectionX = directionX;
command.DirectionY = directionY;
command.ScalarValue = scalarValue;
@ -157,12 +157,12 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetLookDirection(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
double directionX,
double directionY,
double directionZ)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetLookDirection, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetLookDirection, frame);
command.DirectionX = directionX;
command.DirectionY = directionY;
command.PositionZ = directionZ;
@ -170,42 +170,42 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetTractorPower(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
double power)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetTractorPower, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetTractorPower, frame);
command.ScalarValue = power;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope FireWeaponGroup(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
int weaponGroup)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.FireWeaponGroup, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.FireWeaponGroup, frame);
command.WeaponGroup = weaponGroup;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope SetWeaponGroupActive(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
int weaponGroup,
bool active)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetWeaponGroupActive, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetWeaponGroupActive, frame);
command.WeaponGroup = weaponGroup;
command.ScalarValue = active ? 1.0 : 0.0;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope SetWeaponGroupMembership(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
int equipmentIndex,
int weaponGroup,
bool assigned)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetWeaponGroupMembership, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetWeaponGroupMembership, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.EquipmentIndex = equipmentIndex;
command.WeaponGroup = weaponGroup;
@ -214,12 +214,12 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetBehaviorActive(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
int equipmentIndex,
int behaviorIndex,
bool active)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetBehaviorActive, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetBehaviorActive, frame);
command.EquipmentIndex = equipmentIndex;
command.BehaviorIndex = behaviorIndex;
command.ScalarValue = active ? 1.0 : 0.0;
@ -227,71 +227,71 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope ActivateConsumable(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string itemKey)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.ActivateConsumable, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.ActivateConsumable, frame);
command.TextValue = itemKey ?? "";
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope SensorPing(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope SensorPing(AetheriaRuntimeDaemonFrameDocument? frame)
{
return Send(Create(AetheriaRuntimeDaemonCommandKinds.SensorPing, observed));
return Send(Create(AetheriaRuntimeDaemonCommandKinds.SensorPing, frame));
}
internal AetheriaRuntimeDaemonCommandEnvelope SetHeatsinksEnabled(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
bool enabled)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetHeatsinksEnabled, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetHeatsinksEnabled, frame);
command.ScalarValue = enabled ? 1.0 : 0.0;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope SetOverrideShutdown(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
bool enabled)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetOverrideShutdown, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetOverrideShutdown, frame);
command.ScalarValue = enabled ? 1.0 : 0.0;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope SetOverrideShutdown(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
bool enabled)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetOverrideShutdown, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetOverrideShutdown, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.ScalarValue = enabled ? 1.0 : 0.0;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope SetItemEnabled(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
int equipmentIndex,
bool enabled)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetItemEnabled, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetItemEnabled, frame);
command.EquipmentIndex = equipmentIndex;
command.ScalarValue = enabled ? 1.0 : 0.0;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope ToggleShieldEnabled(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope ToggleShieldEnabled(AetheriaRuntimeDaemonFrameDocument? frame)
{
return Send(Create(AetheriaRuntimeDaemonCommandKinds.ToggleShieldEnabled, observed));
return Send(Create(AetheriaRuntimeDaemonCommandKinds.ToggleShieldEnabled, frame));
}
internal AetheriaRuntimeDaemonCommandEnvelope SetItemOverrideShutdown(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
int equipmentIndex,
bool enabled)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetItemOverrideShutdown, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetItemOverrideShutdown, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.EquipmentIndex = equipmentIndex;
command.ScalarValue = enabled ? 1.0 : 0.0;
@ -299,13 +299,13 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetThermotoggleTargetTemperature(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
int equipmentIndex,
int behaviorIndex,
double targetTemperature)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetThermotoggleTargetTemperature, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetThermotoggleTargetTemperature, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.EquipmentIndex = equipmentIndex;
command.BehaviorIndex = behaviorIndex;
@ -314,24 +314,24 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetShutdownPerformance(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
double shutdownPerformance)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetShutdownPerformance, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetShutdownPerformance, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.ScalarValue = shutdownPerformance;
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope ToggleHullConductivity(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
int x,
int y,
int axis)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.ToggleHullConductivity, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.ToggleHullConductivity, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.PositionX = x;
command.PositionY = y;
@ -340,56 +340,56 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope SetEntityName(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
string name)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetEntityName, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetEntityName, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.TextValue = name ?? "";
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope Dock(AetheriaRuntimeObservedDaemonState? observed, string targetEntityKey)
internal AetheriaRuntimeDaemonCommandEnvelope Dock(AetheriaRuntimeDaemonFrameDocument? frame, string targetEntityKey)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.Dock, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.Dock, frame);
command.TargetEntityKey = targetEntityKey ?? "";
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope DockNearest(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope DockNearest(AetheriaRuntimeDaemonFrameDocument? frame)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.DockNearest, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.DockNearest, frame);
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope Undock(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope Undock(AetheriaRuntimeDaemonFrameDocument? frame)
{
return Send(Create(AetheriaRuntimeDaemonCommandKinds.Undock, observed));
return Send(Create(AetheriaRuntimeDaemonCommandKinds.Undock, frame));
}
internal AetheriaRuntimeDaemonCommandEnvelope Interact(AetheriaRuntimeObservedDaemonState? observed)
internal AetheriaRuntimeDaemonCommandEnvelope Interact(AetheriaRuntimeDaemonFrameDocument? frame)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.Interact, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.Interact, frame);
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope SetDockedCurrentShip(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetDockedCurrentShip, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.SetDockedCurrentShip, frame);
command.TargetEntityKey = targetEntityKey ?? "";
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope EnterWormhole(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
int targetZoneIndex,
double positionX,
double positionY)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.EnterWormhole, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.EnterWormhole, frame);
command.TargetZoneIndex = targetZoneIndex;
command.PositionX = positionX;
command.PositionY = positionY;
@ -397,16 +397,16 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope TowToStation(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string stationEntityKey)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.TowToStation, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.TowToStation, frame);
command.TargetEntityKey = stationEntityKey ?? "";
return Send(command);
}
internal AetheriaRuntimeDaemonCommandEnvelope TransferCargoItem(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string originEntityKey,
int originCargoIndex,
string destinationEntityKey,
@ -419,7 +419,7 @@ namespace GameCult.Aetheria.State.Verse
int destinationY,
bool hasDestinationPosition)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.TransferCargoItem, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.TransferCargoItem, frame);
command.TargetEntityKey = destinationEntityKey ?? "";
command.EquipmentIndex = destinationCargoIndex;
command.PositionX = destinationX;
@ -439,7 +439,7 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope TradePurchase(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string purchaseKind,
string itemKey,
int quantity,
@ -453,7 +453,7 @@ namespace GameCult.Aetheria.State.Verse
int sourceY,
bool createsDockedShip)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.TradePurchase, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.TradePurchase, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.EquipmentIndex = targetCargoIndex;
command.PositionX = sourceX;
@ -476,7 +476,7 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope PickUpLoot(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string targetEntityKey,
string itemKey,
int quantity,
@ -484,7 +484,7 @@ namespace GameCult.Aetheria.State.Verse
double positionY,
double positionZ)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.PickUpLoot, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.PickUpLoot, frame);
command.TargetEntityKey = targetEntityKey ?? "";
command.TextValue = itemKey ?? "";
command.ScalarValue = quantity;
@ -500,12 +500,12 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope RestoreLoadout(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string dockedEntityKey,
string templateName,
int price)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.RestoreLoadout, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.RestoreLoadout, frame);
command.TargetEntityKey = dockedEntityKey ?? "";
command.TextValue = templateName ?? "";
command.ScalarValue = price;
@ -516,7 +516,7 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope EquipItem(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string sourceKind,
string originEntityKey,
int originIndex,
@ -528,7 +528,7 @@ namespace GameCult.Aetheria.State.Verse
int destinationY,
bool hasDestinationPosition)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.EquipItem, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.EquipItem, frame);
command.TargetEntityKey = destinationEntityKey ?? "";
command.PositionX = destinationX;
command.PositionY = destinationY;
@ -546,7 +546,7 @@ namespace GameCult.Aetheria.State.Verse
}
internal AetheriaRuntimeDaemonCommandEnvelope StoreItem(
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
string originEntityKey,
int sourceEquipmentIndex,
string destinationEntityKey,
@ -556,7 +556,7 @@ namespace GameCult.Aetheria.State.Verse
int destinationY,
bool hasDestinationPosition)
{
var command = Create(AetheriaRuntimeDaemonCommandKinds.StoreItem, observed);
var command = Create(AetheriaRuntimeDaemonCommandKinds.StoreItem, frame);
command.TargetEntityKey = destinationEntityKey ?? "";
command.EquipmentIndex = sourceEquipmentIndex;
command.PositionX = destinationX;

View file

@ -7,42 +7,42 @@ namespace GameCult.Aetheria.State.Verse
{
public sealed class AetheriaRuntimeDaemonOperationsClient
{
private readonly Func<Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeObservedDaemonState?, AetheriaRuntimeDaemonCommandEnvelope>, AetheriaRuntimeDaemonCommandEnvelope> _submit;
private readonly Func<Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeDaemonFrameDocument?, AetheriaRuntimeDaemonCommandEnvelope>, AetheriaRuntimeDaemonCommandEnvelope> _submit;
internal AetheriaRuntimeDaemonOperationsClient(
Func<Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeObservedDaemonState?, AetheriaRuntimeDaemonCommandEnvelope>, AetheriaRuntimeDaemonCommandEnvelope> submit)
Func<Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeDaemonFrameDocument?, AetheriaRuntimeDaemonCommandEnvelope>, AetheriaRuntimeDaemonCommandEnvelope> submit)
{
_submit = submit ?? throw new ArgumentNullException(nameof(submit));
}
public AetheriaRuntimeDaemonCommandEnvelope SetTarget(string targetEntityKey)
{
return Submit((client, observed) => client.SetTarget(observed, targetEntityKey));
return Submit((client, frame) => client.SetTarget(frame, targetEntityKey));
}
public CultMeshOperationReceipt ClearTarget()
{
return Send((client, observed) => client.ClearTarget(observed));
return Send((client, frame) => client.ClearTarget(frame));
}
public CultMeshOperationReceipt TargetNearest()
{
return Send((client, observed) => client.TargetNearest(observed));
return Send((client, frame) => client.TargetNearest(frame));
}
public CultMeshOperationReceipt TargetNext()
{
return Send((client, observed) => client.TargetNext(observed));
return Send((client, frame) => client.TargetNext(frame));
}
public CultMeshOperationReceipt TargetPrevious()
{
return Send((client, observed) => client.TargetPrevious(observed));
return Send((client, frame) => client.TargetPrevious(frame));
}
public CultMeshOperationReceipt TargetReticle(double directionX, double directionY, double directionZ)
{
return Send((client, observed) => client.TargetReticle(observed, directionX, directionY, directionZ));
return Send((client, frame) => client.TargetReticle(frame, directionX, directionY, directionZ));
}
public AetheriaRuntimeDaemonCommandEnvelope SetMoveVector(
@ -50,27 +50,27 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
double directionY,
double scalarValue = 1.0)
{
return Submit((client, observed) => client.SetMoveVector(observed, directionX, directionY, scalarValue));
return Submit((client, frame) => client.SetMoveVector(frame, directionX, directionY, scalarValue));
}
public CultMeshOperationReceipt SetLookDirection(double directionX, double directionY, double directionZ)
{
return Send((client, observed) => client.SetLookDirection(observed, directionX, directionY, directionZ));
return Send((client, frame) => client.SetLookDirection(frame, directionX, directionY, directionZ));
}
public CultMeshOperationReceipt SetTractorPower(double power)
{
return Send((client, observed) => client.SetTractorPower(observed, power));
return Send((client, frame) => client.SetTractorPower(frame, power));
}
public CultMeshOperationReceipt FireWeaponGroup(int weaponGroup)
{
return Send((client, observed) => client.FireWeaponGroup(observed, weaponGroup));
return Send((client, frame) => client.FireWeaponGroup(frame, weaponGroup));
}
public CultMeshOperationReceipt SetWeaponGroupActive(int weaponGroup, bool active)
{
return Send((client, observed) => client.SetWeaponGroupActive(observed, weaponGroup, active));
return Send((client, frame) => client.SetWeaponGroupActive(frame, weaponGroup, active));
}
public CultMeshOperationReceipt SetWeaponGroupMembership(
@ -79,8 +79,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int weaponGroup,
bool assigned)
{
return Send((client, observed) => client.SetWeaponGroupMembership(
observed,
return Send((client, frame) => client.SetWeaponGroupMembership(
frame,
targetEntityKey,
equipmentIndex,
weaponGroup,
@ -89,42 +89,42 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
public CultMeshOperationReceipt SetBehaviorActive(int equipmentIndex, int behaviorIndex, bool active)
{
return Send((client, observed) => client.SetBehaviorActive(observed, equipmentIndex, behaviorIndex, active));
return Send((client, frame) => client.SetBehaviorActive(frame, equipmentIndex, behaviorIndex, active));
}
public CultMeshOperationReceipt ActivateConsumable(string itemKey)
{
return Send((client, observed) => client.ActivateConsumable(observed, itemKey));
return Send((client, frame) => client.ActivateConsumable(frame, itemKey));
}
public CultMeshOperationReceipt SensorPing()
{
return Send((client, observed) => client.SensorPing(observed));
return Send((client, frame) => client.SensorPing(frame));
}
public CultMeshOperationReceipt SetHeatsinksEnabled(bool enabled)
{
return Send((client, observed) => client.SetHeatsinksEnabled(observed, enabled));
return Send((client, frame) => client.SetHeatsinksEnabled(frame, enabled));
}
public CultMeshOperationReceipt SetOverrideShutdown(bool enabled)
{
return Send((client, observed) => client.SetOverrideShutdown(observed, enabled));
return Send((client, frame) => client.SetOverrideShutdown(frame, enabled));
}
public CultMeshOperationReceipt SetEntityOverrideShutdown(string targetEntityKey, bool enabled)
{
return Send((client, observed) => client.SetOverrideShutdown(observed, targetEntityKey, enabled));
return Send((client, frame) => client.SetOverrideShutdown(frame, targetEntityKey, enabled));
}
public CultMeshOperationReceipt SetItemEnabled(int equipmentIndex, bool enabled)
{
return Send((client, observed) => client.SetItemEnabled(observed, equipmentIndex, enabled));
return Send((client, frame) => client.SetItemEnabled(frame, equipmentIndex, enabled));
}
public CultMeshOperationReceipt ToggleShieldEnabled()
{
return Send((client, observed) => client.ToggleShieldEnabled(observed));
return Send((client, frame) => client.ToggleShieldEnabled(frame));
}
public CultMeshOperationReceipt SetItemOverrideShutdown(
@ -132,8 +132,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int equipmentIndex,
bool enabled)
{
return Send((client, observed) => client.SetItemOverrideShutdown(
observed,
return Send((client, frame) => client.SetItemOverrideShutdown(
frame,
targetEntityKey,
equipmentIndex,
enabled));
@ -145,8 +145,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int behaviorIndex,
double targetTemperature)
{
return Send((client, observed) => client.SetThermotoggleTargetTemperature(
observed,
return Send((client, frame) => client.SetThermotoggleTargetTemperature(
frame,
targetEntityKey,
equipmentIndex,
behaviorIndex,
@ -157,8 +157,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
string targetEntityKey,
double shutdownPerformance)
{
return Send((client, observed) => client.SetShutdownPerformance(
observed,
return Send((client, frame) => client.SetShutdownPerformance(
frame,
targetEntityKey,
shutdownPerformance));
}
@ -169,37 +169,37 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int y,
int axis)
{
return Send((client, observed) => client.ToggleHullConductivity(observed, targetEntityKey, x, y, axis));
return Send((client, frame) => client.ToggleHullConductivity(frame, targetEntityKey, x, y, axis));
}
public CultMeshOperationReceipt SetEntityName(string targetEntityKey, string name)
{
return Send((client, observed) => client.SetEntityName(observed, targetEntityKey, name));
return Send((client, frame) => client.SetEntityName(frame, targetEntityKey, name));
}
public CultMeshOperationReceipt Dock(string targetEntityKey)
{
return Send((client, observed) => client.Dock(observed, targetEntityKey));
return Send((client, frame) => client.Dock(frame, targetEntityKey));
}
public CultMeshOperationReceipt DockNearest()
{
return Send((client, observed) => client.DockNearest(observed));
return Send((client, frame) => client.DockNearest(frame));
}
public CultMeshOperationReceipt Undock()
{
return Send((client, observed) => client.Undock(observed));
return Send((client, frame) => client.Undock(frame));
}
public CultMeshOperationReceipt Interact()
{
return Send((client, observed) => client.Interact(observed));
return Send((client, frame) => client.Interact(frame));
}
public CultMeshOperationReceipt SetDockedCurrentShip(string targetEntityKey)
{
return Send((client, observed) => client.SetDockedCurrentShip(observed, targetEntityKey));
return Send((client, frame) => client.SetDockedCurrentShip(frame, targetEntityKey));
}
public CultMeshOperationReceipt EnterWormhole(
@ -207,12 +207,12 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
double positionX,
double positionY)
{
return Send((client, observed) => client.EnterWormhole(observed, targetZoneIndex, positionX, positionY));
return Send((client, frame) => client.EnterWormhole(frame, targetZoneIndex, positionX, positionY));
}
public CultMeshOperationReceipt TowToStation(string stationEntityKey)
{
return Send((client, observed) => client.TowToStation(observed, stationEntityKey));
return Send((client, frame) => client.TowToStation(frame, stationEntityKey));
}
public CultMeshOperationReceipt TransferCargoItem(
@ -228,8 +228,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int destinationY,
bool hasDestinationPosition)
{
return Send((client, observed) => client.TransferCargoItem(
observed,
return Send((client, frame) => client.TransferCargoItem(
frame,
originEntityKey,
originCargoIndex,
destinationEntityKey,
@ -257,8 +257,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int sourceY,
bool createsDockedShip)
{
return Send((client, observed) => client.TradePurchase(
observed,
return Send((client, frame) => client.TradePurchase(
frame,
purchaseKind,
itemKey,
quantity,
@ -281,8 +281,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
double positionY,
double positionZ)
{
return Send((client, observed) => client.PickUpLoot(
observed,
return Send((client, frame) => client.PickUpLoot(
frame,
targetEntityKey,
itemKey,
quantity,
@ -296,7 +296,7 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
string templateName,
int price)
{
return Send((client, observed) => client.RestoreLoadout(observed, dockedEntityKey, templateName, price));
return Send((client, frame) => client.RestoreLoadout(frame, dockedEntityKey, templateName, price));
}
public CultMeshOperationReceipt EquipItem(
@ -311,8 +311,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int destinationY,
bool hasDestinationPosition)
{
return Send((client, observed) => client.EquipItem(
observed,
return Send((client, frame) => client.EquipItem(
frame,
sourceKind,
originEntityKey,
originIndex,
@ -335,8 +335,8 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
int destinationY,
bool hasDestinationPosition)
{
return Send((client, observed) => client.StoreItem(
observed,
return Send((client, frame) => client.StoreItem(
frame,
originEntityKey,
sourceEquipmentIndex,
destinationEntityKey,
@ -348,13 +348,13 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
}
private CultMeshOperationReceipt Send(
Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeObservedDaemonState?, AetheriaRuntimeDaemonCommandEnvelope> submit)
Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeDaemonFrameDocument?, AetheriaRuntimeDaemonCommandEnvelope> submit)
{
return Submit(submit);
}
private AetheriaRuntimeDaemonCommandEnvelope Submit(
Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeObservedDaemonState?, AetheriaRuntimeDaemonCommandEnvelope> submit)
Func<AetheriaRuntimeDaemonOperationClient, AetheriaRuntimeDaemonFrameDocument?, AetheriaRuntimeDaemonCommandEnvelope> submit)
{
return _submit(submit);
}

View file

@ -56,7 +56,7 @@ namespace GameCult.Aetheria.State.Verse
internal static bool TrySubmitArgumentless(
AetheriaRuntimeDaemonOperationClient client,
AetheriaRuntimeObservedDaemonState? observed,
AetheriaRuntimeDaemonFrameDocument? frame,
AetheriaRuntimeDaemonCommandKinds kind,
out AetheriaRuntimeDaemonCommandEnvelope? envelope)
{
@ -68,21 +68,21 @@ namespace GameCult.Aetheria.State.Verse
{
envelope = kind switch
{
AetheriaRuntimeDaemonCommandKinds.ClearTarget => client.ClearTarget(observed),
AetheriaRuntimeDaemonCommandKinds.TargetNearest => client.TargetNearest(observed),
AetheriaRuntimeDaemonCommandKinds.TargetNext => client.TargetNext(observed),
AetheriaRuntimeDaemonCommandKinds.TargetPrevious => client.TargetPrevious(observed),
AetheriaRuntimeDaemonCommandKinds.SetMoveVector => client.SetMoveVector(observed, 0.0, 1.0),
AetheriaRuntimeDaemonCommandKinds.SetLookDirection => client.SetLookDirection(observed, 0.0, 1.0, 0.0),
AetheriaRuntimeDaemonCommandKinds.SetTractorPower => client.SetTractorPower(observed, 1.0),
AetheriaRuntimeDaemonCommandKinds.FireWeaponGroup => client.FireWeaponGroup(observed, 0),
AetheriaRuntimeDaemonCommandKinds.SetWeaponGroupActive => client.SetWeaponGroupActive(observed, 0, true),
AetheriaRuntimeDaemonCommandKinds.SensorPing => client.SensorPing(observed),
AetheriaRuntimeDaemonCommandKinds.SetHeatsinksEnabled => client.SetHeatsinksEnabled(observed, true),
AetheriaRuntimeDaemonCommandKinds.SetOverrideShutdown => client.SetOverrideShutdown(observed, true),
AetheriaRuntimeDaemonCommandKinds.ToggleShieldEnabled => client.ToggleShieldEnabled(observed),
AetheriaRuntimeDaemonCommandKinds.DockNearest => client.DockNearest(observed),
AetheriaRuntimeDaemonCommandKinds.Undock => client.Undock(observed),
AetheriaRuntimeDaemonCommandKinds.ClearTarget => client.ClearTarget(frame),
AetheriaRuntimeDaemonCommandKinds.TargetNearest => client.TargetNearest(frame),
AetheriaRuntimeDaemonCommandKinds.TargetNext => client.TargetNext(frame),
AetheriaRuntimeDaemonCommandKinds.TargetPrevious => client.TargetPrevious(frame),
AetheriaRuntimeDaemonCommandKinds.SetMoveVector => client.SetMoveVector(frame, 0.0, 1.0),
AetheriaRuntimeDaemonCommandKinds.SetLookDirection => client.SetLookDirection(frame, 0.0, 1.0, 0.0),
AetheriaRuntimeDaemonCommandKinds.SetTractorPower => client.SetTractorPower(frame, 1.0),
AetheriaRuntimeDaemonCommandKinds.FireWeaponGroup => client.FireWeaponGroup(frame, 0),
AetheriaRuntimeDaemonCommandKinds.SetWeaponGroupActive => client.SetWeaponGroupActive(frame, 0, true),
AetheriaRuntimeDaemonCommandKinds.SensorPing => client.SensorPing(frame),
AetheriaRuntimeDaemonCommandKinds.SetHeatsinksEnabled => client.SetHeatsinksEnabled(frame, true),
AetheriaRuntimeDaemonCommandKinds.SetOverrideShutdown => client.SetOverrideShutdown(frame, true),
AetheriaRuntimeDaemonCommandKinds.ToggleShieldEnabled => client.ToggleShieldEnabled(frame),
AetheriaRuntimeDaemonCommandKinds.DockNearest => client.DockNearest(frame),
AetheriaRuntimeDaemonCommandKinds.Undock => client.Undock(frame),
_ => null
};
return envelope != null;

View file

@ -21,15 +21,15 @@ namespace GameCult.Aetheria.State.Verse
return false;
}
var observed = client.CurrentObservedDaemon();
var frame = client.CurrentDaemonFrame();
var operationClient = new AetheriaRuntimeDaemonOperationClient(
client.StatePath,
string.IsNullOrWhiteSpace(request.ClientId) ? AetheriaRuntimeDaemonOperationClient.DefaultClientId : request.ClientId,
observed?.Frame.SessionId ?? "local",
frame?.SessionId ?? "local",
client.SubmitDaemonCommandDocument);
return AetheriaRuntimeDaemonSurfaceCommandCatalog.TrySubmitArgumentless(
operationClient,
observed,
frame,
kind,
out envelope);
}