Refactor modular startup and viewer ship debugging

This commit is contained in:
2026-03-13 01:57:13 -04:00
parent a9c08124f5
commit c7fcb08ba6
13 changed files with 962 additions and 127 deletions

View File

@@ -13,6 +13,7 @@ public sealed class SimulationWorld
public required List<ShipRuntime> Ships { get; init; }
public required List<FactionRuntime> Factions { get; init; }
public required Dictionary<string, ShipDefinition> ShipDefinitions { get; init; }
public required Dictionary<string, ItemDefinition> ItemDefinitions { get; init; }
public int TickIntervalMs { get; init; } = 200;
public DateTimeOffset GeneratedAtUtc { get; set; }
}
@@ -42,8 +43,8 @@ public sealed class StationRuntime
public required ConstructibleDefinition Definition { get; init; }
public required Vector3 Position { get; init; }
public required string FactionId { get; init; }
public float OreStored { get; set; }
public float RefinedStock { get; set; }
public Dictionary<string, float> Inventory { get; } = new(StringComparer.Ordinal);
public float EnergyStored { get; set; }
public float ProcessTimer { get; set; }
public HashSet<string> DockedShipIds { get; } = [];
public string LastDeltaSignature { get; set; } = string.Empty;
@@ -63,7 +64,8 @@ public sealed class ShipRuntime
public required DefaultBehaviorRuntime DefaultBehavior { get; set; }
public required ControllerTaskRuntime ControllerTask { get; set; }
public float ActionTimer { get; set; }
public float Cargo { get; set; }
public Dictionary<string, float> Inventory { get; } = new(StringComparer.Ordinal);
public float EnergyStored { get; set; }
public string? DockedStationId { get; set; }
public float Health { get; set; }
public List<string> History { get; } = [];