Step 10L.10: Lighter and Clipper art

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
fireshaper 2026-10-05 02:04:41 -04:00
parent 05e7fbc535
commit 264a933703
8 changed files with 10 additions and 4 deletions

View File

@ -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).

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

View File

@ -51,11 +51,11 @@
},
"ship-lighter": {
"kind": "ship",
"file": null
"file": "ship-lighter.png"
},
"ship-clipper": {
"kind": "ship",
"file": null
"file": "ship-clipper.png"
}
}
}

View File

@ -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);
}

View File

@ -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