feat: v0.12.0 — contracts → packages: load/fly/abandon gameplay (ATR 72-600 capacity 6, manual flight to any airport, time-scaled abandon penalty 15–60%), one-time DB migration preserving wallet/clock; new endpoints /api/packages/:id/load|abandon + /api/planes/:planeId/fly

This commit is contained in:
2026-09-18 11:02:56 +00:00
parent 0208673da7
commit ab2e9fa54a
49 changed files with 2424 additions and 1409 deletions
+5
View File
@@ -13,6 +13,8 @@ export interface PlaneType {
// Market price in € (v0.8.0): buying costs `price`, selling pays out
// SELL_FRACTION × price.
price: number;
// Cargo slot capacity (v0.12.0): how many packages can be loaded on one plane.
capacity: number;
}
export const PLANE_TYPES: Record<string, PlaneType> = {
@@ -25,6 +27,7 @@ export const PLANE_TYPES: Record<string, PlaneType> = {
// €200k — with the starting cash of €20k and typical hop rewards (~€1–3k),
// a second ATR takes sustained play to afford, as intended for the MVP sink.
price: 200_000,
capacity: 6,
},
};
@@ -47,6 +50,7 @@ export interface CatalogEntry {
maxFuel: number;
burnPerKm: number;
speedKmh: number;
capacity: number;
}
// The catalog as a flat array, one entry per plane type — the single source of
@@ -59,5 +63,6 @@ export function catalogEntries(): CatalogEntry[] {
maxFuel: t.maxFuel,
burnPerKm: t.burnPerKm,
speedKmh: t.speedKmh,
capacity: t.capacity,
}));
}