Multiplayer: planes.owner_id + ownership checks (step 5/12) #109

Closed
opened 2026-09-22 10:31:27 +02:00 by kamilkrzywda · 0 comments
Owner

Part of the #101 multiplayer plan.

Add planes.owner_id TEXT NOT NULL (schema + DDL + backfill migration to the seeded player). Thread playerId through loadPackage, flyPlane, queueLeg, cancelQueuedLeg, abandonPackage, sellPlane, buyPlane in lib/game/actions.ts with 403 on foreign planes; make the "can't sell your last plane" guard per-owner.

Part of the #101 multiplayer plan. Add `planes.owner_id TEXT NOT NULL` (schema + DDL + backfill migration to the seeded player). Thread playerId through loadPackage, flyPlane, queueLeg, cancelQueuedLeg, abandonPackage, sellPlane, buyPlane in lib/game/actions.ts with 403 on foreign planes; make the "can't sell your last plane" guard per-owner.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#109