Maintenance: distance wear, broken-state burn ×1.5, repair action (ISS-069, v0.39.0)
CI / build + unit + e2e (pull_request) Successful in 9m34s
CI / build + unit + e2e (pull_request) Successful in 9m34s
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { performAction, repairPlane } from '@/lib/game/actions';
|
||||
|
||||
// POST /api/planes/:planeId/repair (v0.39.0, ISS-069) — no body. Restores a worn-out plane to
|
||||
// full health for the flat REPAIR_COST: it is grounded in "repairing" status until 3 sim days
|
||||
// pass, when the engine's tick flips it back to "available". A full-health repair is a free
|
||||
// no-op (cost 0). 404 unknown id; 409 plane not grounded or insufficient funds. On success
|
||||
// returns the full state snapshot.
|
||||
|
||||
export async function POST(_req: Request, ctx: { params: Promise<{ planeId: string }> }) {
|
||||
const { planeId } = await ctx.params;
|
||||
return performAction((inst) => repairPlane(inst, planeId));
|
||||
}
|
||||
Reference in New Issue
Block a user