Split viewer and simulation into separate apps
This commit is contained in:
76
apps/backend/Contracts/WorldContracts.cs
Normal file
76
apps/backend/Contracts/WorldContracts.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
namespace SpaceGame.Simulation.Api.Contracts;
|
||||
|
||||
public sealed record WorldSnapshot(
|
||||
string Label,
|
||||
int Seed,
|
||||
DateTimeOffset GeneratedAtUtc,
|
||||
IReadOnlyList<SystemSnapshot> Systems,
|
||||
IReadOnlyList<ResourceNodeSnapshot> Nodes,
|
||||
IReadOnlyList<StationSnapshot> Stations,
|
||||
IReadOnlyList<ShipSnapshot> Ships,
|
||||
IReadOnlyList<FactionSnapshot> Factions);
|
||||
|
||||
public sealed record SystemSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
Vector3Dto Position,
|
||||
string StarColor,
|
||||
float StarSize,
|
||||
IReadOnlyList<PlanetSnapshot> Planets);
|
||||
|
||||
public sealed record PlanetSnapshot(
|
||||
string Label,
|
||||
float OrbitRadius,
|
||||
float Size,
|
||||
string Color,
|
||||
bool HasRing);
|
||||
|
||||
public sealed record ResourceNodeSnapshot(
|
||||
string Id,
|
||||
string SystemId,
|
||||
Vector3Dto Position,
|
||||
float OreRemaining,
|
||||
float MaxOre,
|
||||
string ItemId);
|
||||
|
||||
public sealed record StationSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Category,
|
||||
string SystemId,
|
||||
Vector3Dto Position,
|
||||
string Color,
|
||||
int DockedShips,
|
||||
float OreStored,
|
||||
float RefinedStock,
|
||||
string FactionId);
|
||||
|
||||
public sealed record ShipSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Role,
|
||||
string ShipClass,
|
||||
string SystemId,
|
||||
Vector3Dto Position,
|
||||
string State,
|
||||
string? OrderKind,
|
||||
string DefaultBehaviorKind,
|
||||
string ControllerTaskKind,
|
||||
float Cargo,
|
||||
float CargoCapacity,
|
||||
string? CargoItemId,
|
||||
string FactionId,
|
||||
float Health,
|
||||
IReadOnlyList<string> History);
|
||||
|
||||
public sealed record FactionSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Color,
|
||||
float Credits,
|
||||
float OreMined,
|
||||
float GoodsProduced,
|
||||
int ShipsBuilt,
|
||||
int ShipsLost);
|
||||
|
||||
public sealed record Vector3Dto(float X, float Y, float Z);
|
||||
Reference in New Issue
Block a user