Maintenance — planes have health/repair status; broken planes burn more fuel; repair costs money and takes days #69

Closed
opened 2026-09-21 09:51:24 +02:00 by kamilkrzywda · 0 comments
Owner

Planes should wear out with use and need maintenance.

  • Each plane gets a health value that degrades with usage (distance flown). Health is visible per plane in the Fleet list (left pane).
  • When health drops to zero (or below a threshold) the plane is broken: it can still fly, but has significantly bigger fuel consumption (e.g. +50% burn — tune as needed).
  • Repair costs money and takes time: player pays at an airport and the plane is grounded/unavailable for a few sim days until repaired.

Implementation notes:

  • New action endpoint following the existing performAction pattern (lib/sim/engine.ts), full state snapshot returned.
  • Update OpenAPI spec in code (lib/openapi.ts) when endpoints/state shape change.
  • Unit tests: wear accumulation, broken-state fuel-burn multiplier, repair cost + duration (plane unavailable while repairing). E2e spec covering the visible flow (health shown → broken burn → repair → back to service). CI-only e2e per AGENTS.md.
Planes should wear out with use and need maintenance. - Each plane gets a **health** value that degrades with usage (distance flown). Health is visible per plane in the Fleet list (left pane). - When health drops to zero (or below a threshold) the plane is **broken**: it can still fly, but has significantly bigger fuel consumption (e.g. +50% burn — tune as needed). - **Repair** costs money and takes time: player pays at an airport and the plane is grounded/unavailable for a few sim days until repaired. Implementation notes: - New action endpoint following the existing `performAction` pattern (`lib/sim/engine.ts`), full state snapshot returned. - Update OpenAPI spec in code (`lib/openapi.ts`) when endpoints/state shape change. - Unit tests: wear accumulation, broken-state fuel-burn multiplier, repair cost + duration (plane unavailable while repairing). E2e spec covering the visible flow (health shown → broken burn → repair → back to service). CI-only e2e per AGENTS.md.
kamilkrzywda added the enhancement label 2026-09-21 09:51:24 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#69