v0.65.0: fix pool comments — queued legs count toward the pool even while their plane is in the shop (startRepair keeps the queue), so an all-repairing fleet only has no pools when its queues are empty too
CI / build + unit + e2e (pull_request) Failing after 16m24s
CI / build + unit + e2e (pull_request) Failing after 16m24s
This commit is contained in:
+3
-2
@@ -51,8 +51,9 @@ export function parseIcaoQueue(raw: string | null): string[] {
|
||||
}
|
||||
|
||||
// v0.65.0: the airports where a plane can take work — grounded there, flying TO it (its destination
|
||||
// joins the pool while airborne), or queued for it. Repairing planes count nowhere: a fleet in the
|
||||
// shop has no pools until one frees up. Shared by the snapshot's visibility filter and the engine's
|
||||
// joins the pool while airborne), or queued for it (queued legs count even while their plane is in
|
||||
// the shop — the work will be waiting at its next stop). A fleet fully repairing with empty queues
|
||||
// has no pools until one frees up. Shared by the snapshot's visibility filter and the engine's
|
||||
// pool spawner so both agree on exactly which airports keep open jobs.
|
||||
export function poolAirports(planes: Array<{ status: string; locationIcao: string; destIcao: string | null; queue: string | null }>): Set<string> {
|
||||
const set = new Set<string>();
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@ export async function spawnPoolPackages(
|
||||
]);
|
||||
|
||||
const pool = poolAirports(planeRows);
|
||||
if (pool.size === 0) return 0; // whole fleet repairing — nothing to spawn for until one frees up
|
||||
if (pool.size === 0) return 0; // no pool airports — e.g. the whole fleet is in the shop with empty queues
|
||||
|
||||
const fc = await loadAirportsGeoJson();
|
||||
const airports: SeedAirport[] = fc.features.map((f) => ({
|
||||
|
||||
Reference in New Issue
Block a user