feat: simplified local-space and celestial, removed bubbles
This commit is contained in:
@@ -5,8 +5,7 @@ public sealed class ClaimRuntime
|
||||
public required string Id { get; init; }
|
||||
public required string FactionId { get; init; }
|
||||
public required string SystemId { get; init; }
|
||||
public required string NodeId { get; init; }
|
||||
public required string BubbleId { get; init; }
|
||||
public required string CelestialId { get; init; }
|
||||
public string? CommanderId { get; set; }
|
||||
public DateTimeOffset PlacedAtUtc { get; init; }
|
||||
public DateTimeOffset ActivatesAtUtc { get; set; }
|
||||
@@ -20,8 +19,7 @@ public sealed class ConstructionSiteRuntime
|
||||
public required string Id { get; init; }
|
||||
public required string FactionId { get; init; }
|
||||
public required string SystemId { get; init; }
|
||||
public required string NodeId { get; init; }
|
||||
public required string BubbleId { get; init; }
|
||||
public required string CelestialId { get; init; }
|
||||
public required string TargetKind { get; init; }
|
||||
public required string TargetDefinitionId { get; init; }
|
||||
public string? BlueprintId { get; set; }
|
||||
|
||||
@@ -6,8 +6,6 @@ public enum SpatialNodeKind
|
||||
Planet,
|
||||
Moon,
|
||||
LagrangePoint,
|
||||
Station,
|
||||
ResourceSite,
|
||||
}
|
||||
|
||||
public enum WorkStatus
|
||||
@@ -112,7 +110,7 @@ public static class ShipTaskKinds
|
||||
public const string BuildConstructionSite = "build-construction-site";
|
||||
public const string EscortTarget = "escort-target";
|
||||
public const string AttackTarget = "attack-target";
|
||||
public const string DefendBubble = "defend-bubble";
|
||||
public const string DefendCelestial = "defend-celestial";
|
||||
public const string Retreat = "retreat";
|
||||
public const string HoldPosition = "hold-position";
|
||||
}
|
||||
@@ -167,8 +165,6 @@ public static class SimulationEnumMappings
|
||||
SpatialNodeKind.Planet => "planet",
|
||||
SpatialNodeKind.Moon => "moon",
|
||||
SpatialNodeKind.LagrangePoint => "lagrange-point",
|
||||
SpatialNodeKind.Station => "station",
|
||||
SpatialNodeKind.ResourceSite => "resource-site",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(kind), kind, null),
|
||||
};
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ public sealed class SimulationWorld
|
||||
public required BalanceDefinition Balance { get; init; }
|
||||
public required List<SystemRuntime> Systems { get; init; }
|
||||
public required List<ResourceNodeRuntime> Nodes { get; init; }
|
||||
public required List<NodeRuntime> SpatialNodes { get; init; }
|
||||
public required List<LocalBubbleRuntime> LocalBubbles { get; init; }
|
||||
public required List<CelestialRuntime> Celestials { get; init; }
|
||||
public required List<StationRuntime> Stations { get; init; }
|
||||
public required List<ShipRuntime> Ships { get; init; }
|
||||
public required List<FactionRuntime> Factions { get; init; }
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class ResourceNodeRuntime
|
||||
public required Vector3 Position { get; set; }
|
||||
public required string SourceKind { get; init; }
|
||||
public required string ItemId { get; init; }
|
||||
public string? AnchorNodeId { get; set; }
|
||||
public string? CelestialId { get; set; }
|
||||
public float OrbitRadius { get; init; }
|
||||
public float OrbitPhase { get; init; }
|
||||
public float OrbitInclination { get; init; }
|
||||
@@ -24,38 +24,24 @@ public sealed class ResourceNodeRuntime
|
||||
public string LastDeltaSignature { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class NodeRuntime
|
||||
public sealed class CelestialRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string SystemId { get; init; }
|
||||
public required SpatialNodeKind Kind { get; init; }
|
||||
public required Vector3 Position { get; set; }
|
||||
public required string BubbleId { get; init; }
|
||||
public float LocalSpaceRadius { get; init; }
|
||||
public string? ParentNodeId { get; set; }
|
||||
public string? OccupyingStructureId { get; set; }
|
||||
public string? OrbitReferenceId { get; set; }
|
||||
public string LastDeltaSignature { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class LocalBubbleRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string NodeId { get; init; }
|
||||
public required string SystemId { get; init; }
|
||||
public float Radius { get; init; }
|
||||
public HashSet<string> OccupantShipIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> OccupantStationIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> OccupantClaimIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> OccupantConstructionSiteIds { get; } = new(StringComparer.Ordinal);
|
||||
public string LastDeltaSignature { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class ShipSpatialStateRuntime
|
||||
{
|
||||
public string SpaceLayer { get; set; } = SpaceLayerKinds.LocalSpace;
|
||||
public required string CurrentSystemId { get; set; }
|
||||
public string? CurrentNodeId { get; set; }
|
||||
public string? CurrentBubbleId { get; set; }
|
||||
public string? CurrentCelestialId { get; set; }
|
||||
public Vector3? LocalPosition { get; set; }
|
||||
public Vector3? SystemPosition { get; set; }
|
||||
public string MovementRegime { get; set; } = MovementRegimeKinds.LocalFlight;
|
||||
|
||||
@@ -10,9 +10,7 @@ public sealed class StationRuntime
|
||||
public required Vector3 Position { get; set; }
|
||||
public float Radius { get; set; } = 24f;
|
||||
public required string FactionId { get; init; }
|
||||
public string? NodeId { get; set; }
|
||||
public string? BubbleId { get; set; }
|
||||
public string? AnchorNodeId { get; set; }
|
||||
public string? CelestialId { get; set; }
|
||||
public string? CommanderId { get; set; }
|
||||
public string? PolicySetId { get; set; }
|
||||
public List<StationModuleRuntime> Modules { get; } = [];
|
||||
|
||||
Reference in New Issue
Block a user