diff --git a/DECISIONS.md b/DECISIONS.md index a815750..ff06335 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -1188,3 +1188,8 @@ Implementation decisions not spelled out in `memory-bank/implementation-plan.md` - **The client now passes discovered ids** to `validateDispatch`, so the sheet agrees with the server (10L.3 left it lenient). - **The stranding line replaces the range line, never adds to it**: it is shown only when the leg itself is in range, matching the sim's check order. - **`wouldStrand` accepts a bare `ShipModel`** (travel time already falls back to the game-wide handling rate), so the sheet's explainer can use it with the stats it already has. + +## Step 10L.10 + +- **The art arrived with the CR**, so both ships use real sprites rather than the placeholder. Both face nose-up on transparent backgrounds, like the existing ships. +- **The transparency check tolerates alpha ≤ 2/255** rather than editing the user's file: `ship-lighter.png` has a stray alpha-1 pixel in one corner, which is invisible. The script never writes sources (decision 0.5.37). diff --git a/apps/web/public/assets/map-gen/ship-clipper@1x.png b/apps/web/public/assets/map-gen/ship-clipper@1x.png new file mode 100644 index 0000000..f4f500f Binary files /dev/null and b/apps/web/public/assets/map-gen/ship-clipper@1x.png differ diff --git a/apps/web/public/assets/map-gen/ship-clipper@2x.png b/apps/web/public/assets/map-gen/ship-clipper@2x.png new file mode 100644 index 0000000..e6fe4fd Binary files /dev/null and b/apps/web/public/assets/map-gen/ship-clipper@2x.png differ diff --git a/apps/web/public/assets/map-gen/ship-lighter@1x.png b/apps/web/public/assets/map-gen/ship-lighter@1x.png new file mode 100644 index 0000000..7753bfe Binary files /dev/null and b/apps/web/public/assets/map-gen/ship-lighter@1x.png differ diff --git a/apps/web/public/assets/map-gen/ship-lighter@2x.png b/apps/web/public/assets/map-gen/ship-lighter@2x.png new file mode 100644 index 0000000..e9c0f54 Binary files /dev/null and b/apps/web/public/assets/map-gen/ship-lighter@2x.png differ diff --git a/apps/web/src/map/art/manifest.json b/apps/web/src/map/art/manifest.json index 3b3e6fb..7d00422 100644 --- a/apps/web/src/map/art/manifest.json +++ b/apps/web/src/map/art/manifest.json @@ -51,11 +51,11 @@ }, "ship-lighter": { "kind": "ship", - "file": null + "file": "ship-lighter.png" }, "ship-clipper": { "kind": "ship", - "file": null + "file": "ship-clipper.png" } } } diff --git a/apps/web/test/map-art.test.ts b/apps/web/test/map-art.test.ts index 4809c9d..48f0285 100644 --- a/apps/web/test/map-art.test.ts +++ b/apps/web/test/map-art.test.ts @@ -94,7 +94,8 @@ describe("map art optimization script (CR-003)", () => { alpha(info.width - 1, info.height - 1), ]; expect( - corners.every((a) => a === 0), + // Alpha up to 2/255 is invisible (ship-lighter.png has a stray alpha-1 corner pixel). + corners.every((a) => a! <= 2), `${asset.file} (${id}): background isn't transparent`, ).toBe(true); } diff --git a/memory-bank/progress.md b/memory-bank/progress.md index 832a8ca..6e6ac42 100644 --- a/memory-bank/progress.md +++ b/memory-bank/progress.md @@ -278,5 +278,5 @@ Spec: `memory-bank/change-requests/CR-012-lighter-clipper-range.md` (received as - [x] **Step 10L.7 — Client: Market shows roles and reach.** Each Market card shows the model's role and a Reach line from `shipReach` (`apps/web/src/game.ts`, sim `checkRoute`): "From Earth now: Moon, Mars · Other dates: … · By hopping: Ceres Station", with one "From X now" part per HQ location. "Other dates" lists places reachable directly from an HQ but not today; "By hopping" lists places reachable only through other locations (each leg in range on some monthly date over 16 game years). Tests (`market-reach.test.tsx`): roles; the Clipper lists Mars from Earth only on a date when it is in range (otherwise under Other dates) and always lists Ceres by hopping; the Lighter lists only the Moon. - [x] **Step 10L.8 — Client: reachability from where ships actually are.** An undiscovered location's map panel now reads "From Mars: Clipper, Freighter · From Earth: Freighter": one part per discovered location with an HQ or idle ship (`playerOrigins`, Earth when there are none yet), listing purchasable models in range from there now plus the player's ships there that reach it only thanks to upgrades (`reachersByOrigin` in `map/reach.ts`, replacing the Earth-only helpers). Tests: `map-reach-origins.test.tsx` (a Clipper at Mars on a date Mars→Ceres is in range: Ceres lists Clipper from Mars, not from Earth); `map-locked.test.tsx` now expects "From Earth: …" for a tutorial player. - [x] **Step 10L.9 — Client: stranding reason.** The dispatch sheet passes the player's discovered ids to `validateDispatch` and explains a stranding pair as "Would be stranded — can't fly out of Mars from there" (`strandedText`); the deadhead picker disables such a destination with the same text. `wouldStrand` now takes a bare model or effective stats. Test (`stranding-reason.test.tsx`, a Clipper at the Moon on a date it could hop to Mars but not leave): the pair's only problem is the stranding text; the Mars deadhead is disabled with it while Earth stays enabled. -- [ ] Step 10L.10 — Art +- [x] **Step 10L.10 — Art.** The user's `ship-lighter.png` and `ship-clipper.png` (in `public/assets/map/`) are now in the manifest; `pnpm --filter @deadhead/web map-art` wrote their @1x/@2x sprites to `map-gen` (the other outputs regenerated byte-identical). The source-transparency test allows corner alpha up to 2/255, because `ship-lighter.png` has one alpha-1 corner pixel. All manifest tests pass. - [ ] Step 10L.11 — Plan amendments and regression