Files
space-game/apps/backend/Contracts/WorldContracts.Ships.cs

85 lines
2.0 KiB
C#

namespace SpaceGame.Simulation.Api.Contracts;
public sealed record ShipSnapshot(
string Id,
string Label,
string Role,
string ShipClass,
string SystemId,
Vector3Dto LocalPosition,
Vector3Dto LocalVelocity,
Vector3Dto TargetLocalPosition,
string State,
string? OrderKind,
string DefaultBehaviorKind,
string ControllerTaskKind,
string? NodeId,
string? BubbleId,
string? DockedStationId,
string? CommanderId,
string? PolicySetId,
float CargoCapacity,
string? CargoItemId,
float WorkerPopulation,
float TravelSpeed,
string TravelSpeedUnit,
IReadOnlyList<InventoryEntry> Inventory,
string FactionId,
float Health,
IReadOnlyList<string> History,
ShipActionProgressSnapshot? CurrentAction,
ShipSpatialStateSnapshot SpatialState);
public sealed record ShipDelta(
string Id,
string Label,
string Role,
string ShipClass,
string SystemId,
Vector3Dto LocalPosition,
Vector3Dto LocalVelocity,
Vector3Dto TargetLocalPosition,
string State,
string? OrderKind,
string DefaultBehaviorKind,
string ControllerTaskKind,
string? NodeId,
string? BubbleId,
string? DockedStationId,
string? CommanderId,
string? PolicySetId,
float CargoCapacity,
string? CargoItemId,
float WorkerPopulation,
float TravelSpeed,
string TravelSpeedUnit,
IReadOnlyList<InventoryEntry> Inventory,
string FactionId,
float Health,
IReadOnlyList<string> History,
ShipActionProgressSnapshot? CurrentAction,
ShipSpatialStateSnapshot SpatialState);
public sealed record ShipActionProgressSnapshot(
string Label,
float Progress);
public sealed record ShipSpatialStateSnapshot(
string SpaceLayer,
string CurrentSystemId,
string? CurrentNodeId,
string? CurrentBubbleId,
Vector3Dto? LocalPosition,
Vector3Dto? SystemPosition,
string MovementRegime,
string? DestinationNodeId,
ShipTransitSnapshot? Transit);
public sealed record ShipTransitSnapshot(
string Regime,
string? OriginNodeId,
string? DestinationNodeId,
DateTimeOffset? StartedAtUtc,
DateTimeOffset? ArrivalDueAtUtc,
float Progress);