v0.8.0.11 — sixteen fixes from the second multiplayer playtest

Arrivals name whose Office they reached, and no longer tell every seat they can
work the train. The turn chart follows the animation queue, so being five behind
looks five behind across the whole screen rather than half of it. Pause sits
beside Skip and preserves the dwell a held step still owed. A one-render look at
another player's Office Area. The district summary counts the board being shown.
LIMITS is printed beneath its card instead of through its border. The Mainline
region divider is visible. Only Hilly mentions FAST/SLOW, because it is the only
card that reads it. A passenger Modifier on a Whistle Post reports itself dormant
rather than claiming the facility "only receives". An automatic phase says what
the Division is doing instead of answering by negation. The version appears once
in the header rather than twice on every .s9pk. Save files carry the join code,
the Stage and the date.

The New Train phase, reviewed before being changed: the make-up panel now says
what the train STILL needs rather than only what its card calls for, explains
that a player adds one car before the round passes on, marks the train being
loaded on the Division map, and gives an addable car in the yard the same amber
every other clickable thing on the page wears.

Reasoning, measurements and the reports behind each are in CHANGELOG.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nnuCv8UodHucFfx3LWEoX
This commit is contained in:
Jesse.Markowitz
2026-09-16 16:06:01 -04:00
co-authored by Claude Opus 5
parent 4adf149ba5
commit 9a9e50b3c6
21 changed files with 701 additions and 44 deletions
+50
View File
@@ -663,6 +663,14 @@ export type Menu = {
makeUp: {
trayId: string;
title: string;
/**
* What the card still wants, after what is already coupled up — "1 boxcar/hopper + 1 caboose".
*
* The title says what the card CALLS FOR and never changes as cars go on, so a player had to
* diff it against the consist drawn on the Division map, in the other column. Null when the
* train is complete and only the send-it-out button is left.
*/
needs: string | null;
cars: MakeUpAction[];
pass: number | null;
/**
@@ -803,6 +811,7 @@ export function actionMenu(game: Game, seat: PlayerIndex = 0): Menu {
? {
trayId: filling,
title: consistTitle(game, filling) ?? 'Making up the train',
needs: consistNeeds(game, filling),
cars: makeUpCars,
pass,
advice: makeUpAdvice(game, filling, makeUpCars),
@@ -955,6 +964,40 @@ function consistTitle(game: Game, trayId: string): string | null {
return trainCardTitle(tray.trainNumber ?? 0, tray.trainIsExtra);
}
/**
* WHAT THE TRAIN STILL WANTS — the card's demand minus what is already on it.
*
* The heading says "its card calls for 3 boxcar/hopper + 1 caboose" and goes on saying it whether
* you have added none or three; the cars themselves are drawn on the Division map, in the other
* column. So the one question a player actually has while clicking — what is left? — was the one
* thing on screen that had to be worked out by eye, across two panels (Jesse, playtest 2026-09-16).
*
* BY CATEGORY, exactly as `acceptsCar` counts them, so this cannot promise a car the engine would
* then refuse. Null when nothing is outstanding.
*/
function consistNeeds(game: Game, trayId: string): string | null {
const tray = game.state.trays.get(trayId);
if (!tray) return null;
const p = trainProfile(tray.trainNumber ?? 0, tray.trainIsExtra);
if (!p) return null;
const cat = (t: string): 'coach' | 'caboose' | 'freight' =>
t === 'coach' ? 'coach' : t === 'caboose' ? 'caboose' : 'freight';
const have = (k: 'coach' | 'caboose' | 'freight'): number =>
tray.consist.filter((c) => cat(c.type) === k).length;
const parts: string[] = [];
const freight = p.consist.freight - have('freight');
const coach = p.consist.coach - have('coach');
const caboose = p.consist.caboose - have('caboose');
if (freight > 0) {
parts.push(`${freight} ${p.consist.freightTypes?.join('/') ?? 'freight'}${p.consist.emptiesOnly ? ' (empties only)' : ''}`);
}
if (coach > 0) parts.push(`${coach} coach${coach > 1 ? 'es' : ''}`);
if (caboose > 0) parts.push(`${caboose} caboose`);
return parts.length > 0 ? parts.join(' + ') : null;
}
/**
* "Making up Extra X22 “Pee-Dee”: its card calls for 1 caboose — Per-diem train…"
*
@@ -1234,6 +1277,13 @@ function record(game: Game, events: GameEvent[], actor: PlayerIndex | null = nul
const n = narrate(e, {
cardName: (id) => cardName(game.state, id),
trainName: (id) => trainName(game.state, id),
// Whose district a train reached is not the actor — the Mainline Phase has none — so the
// narration resolves the name itself rather than being prefixed with one by the code below.
// NO NUMBER IN THE FALLBACK. This is a PLAYER index, and a player is not a seat — seats rotate
// under Employee Rotation, which is why `seatOf` exists — so "Seat 3" here would be a wrong
// number dressed as a right one, and `session.test.ts` rightly refuses any raw index shown to
// a person. Every caller passes real names; an unnamed player is anonymous rather than mislabelled.
playerName: (p) => game.state.players[p]?.name ?? 'another player',
});
/**
* A BLIND DRAW IS PUBLIC; WHICH CARD CAME UP IS NOT (Gitea#20 step 1).