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

196 lines
4.8 KiB
C#

namespace SpaceGame.Api.Ships.Contracts;
public sealed record ShipSkillProfileSnapshot(
int Navigation,
int Trade,
int Mining,
int Combat,
int Construction);
public sealed record ShipOrderSnapshot(
string Id,
string Kind,
string SourceKind,
string SourceId,
string Status,
int Priority,
bool InterruptCurrentPlan,
DateTimeOffset CreatedAtUtc,
string? Label,
string? TargetEntityId,
string? TargetSystemId,
Vector3Dto? TargetPosition,
string? SourceStationId,
string? DestinationStationId,
string? ItemId,
string? AnchorId,
string? ConstructionSiteId,
string? ModuleId,
float WaitSeconds,
float Radius,
int? MaxSystemRange,
bool KnownStationsOnly,
string? FailureReason);
public sealed record ShipOrderTemplateSnapshot(
string Kind,
string? Label,
string? TargetEntityId,
string? TargetSystemId,
Vector3Dto? TargetPosition,
string? SourceStationId,
string? DestinationStationId,
string? ItemId,
string? AnchorId,
string? ConstructionSiteId,
string? ModuleId,
float WaitSeconds,
float Radius,
int? MaxSystemRange,
bool KnownStationsOnly);
public sealed record DefaultBehaviorSnapshot(
string Kind,
string? HomeSystemId,
string? HomeStationId,
string? AreaSystemId,
string? TargetEntityId,
string? ItemId,
string? PreferredAnchorId,
string? PreferredConstructionSiteId,
string? PreferredModuleId,
Vector3Dto? TargetPosition,
float WaitSeconds,
float Radius,
int MaxSystemRange,
bool KnownStationsOnly,
IReadOnlyList<Vector3Dto> PatrolPoints,
int PatrolIndex,
IReadOnlyList<ShipOrderTemplateSnapshot> RepeatOrders,
int RepeatIndex);
public sealed record ShipAssignmentSnapshot(
string CommanderId,
string? ParentCommanderId,
string Kind,
string BehaviorKind,
string Status,
string? ObjectiveId,
string? CampaignId,
string? TheaterId,
float Priority,
string? HomeSystemId,
string? HomeStationId,
string? TargetSystemId,
string? TargetEntityId,
Vector3Dto? TargetPosition,
string? ItemId,
string? Notes,
DateTimeOffset? UpdatedAtUtc);
public sealed record ShipSubTaskSnapshot(
string Id,
string Kind,
string Status,
string Summary,
string? TargetEntityId,
string? TargetSystemId,
string? TargetAnchorId,
string? TargetResourceNodeId,
string? TargetResourceDepositId,
Vector3Dto? TargetPosition,
string? ItemId,
string? ModuleId,
float Threshold,
float Amount,
float Progress,
float ElapsedSeconds,
float TotalSeconds,
string? BlockingReason);
public sealed record ShipSnapshot(
string Id,
string Name,
string Purpose,
string Type,
string SystemId,
string? AnchorId,
Vector3Dto LocalPosition,
Vector3Dto LocalVelocity,
Vector3Dto TargetLocalPosition,
string State,
IReadOnlyList<ShipOrderSnapshot> OrderQueue,
DefaultBehaviorSnapshot DefaultBehavior,
ShipAssignmentSnapshot? Assignment,
ShipSkillProfileSnapshot Skills,
IReadOnlyList<ShipSubTaskSnapshot> ActiveSubTasks,
string ControlSourceKind,
string? ControlSourceId,
string? ControlReason,
string? LastReplanReason,
string? LastAccessFailureReason,
string? DockedStationId,
string? CommanderId,
string? PolicySetId,
float CargoCapacity,
IReadOnlyList<string> CargoTypes,
float TravelSpeed,
string TravelSpeedUnit,
IReadOnlyList<InventoryEntry> Inventory,
string FactionId,
float Health,
IReadOnlyList<string> History,
ShipSpatialStateSnapshot SpatialState);
public sealed record ShipDelta(
string Id,
string Name,
string Purpose,
string Type,
string SystemId,
string? AnchorId,
Vector3Dto LocalPosition,
Vector3Dto LocalVelocity,
Vector3Dto TargetLocalPosition,
string State,
IReadOnlyList<ShipOrderSnapshot> OrderQueue,
DefaultBehaviorSnapshot DefaultBehavior,
ShipAssignmentSnapshot? Assignment,
ShipSkillProfileSnapshot Skills,
IReadOnlyList<ShipSubTaskSnapshot> ActiveSubTasks,
string ControlSourceKind,
string? ControlSourceId,
string? ControlReason,
string? LastReplanReason,
string? LastAccessFailureReason,
string? DockedStationId,
string? CommanderId,
string? PolicySetId,
float CargoCapacity,
IReadOnlyList<string> CargoTypes,
float TravelSpeed,
string TravelSpeedUnit,
IReadOnlyList<InventoryEntry> Inventory,
string FactionId,
float Health,
IReadOnlyList<string> History,
ShipSpatialStateSnapshot SpatialState);
public sealed record ShipSpatialStateSnapshot(
string SpaceLayer,
string CurrentSystemId,
string? CurrentAnchorId,
Vector3Dto? LocalPosition,
Vector3Dto? SystemPosition,
string MovementRegime,
string? DestinationAnchorId,
ShipTransitSnapshot? Transit);
public sealed record ShipTransitSnapshot(
string Regime,
string? OriginAnchorId,
string? DestinationAnchorId,
DateTimeOffset? StartedAtUtc,
DateTimeOffset? ArrivalDueAtUtc,
float Progress);