More bug fixes. Show the timetable, and stop the arrival message contradicting itself. Fixed division point in labels. And highlighted discard as targets.
This commit is contained in:
+34
-3
@@ -109,6 +109,16 @@ export type FacilityView = {
|
||||
* anywhere. Keeping the base lets the panel say "2 (1 + 1 from a Modifier)".
|
||||
*/
|
||||
base: { out: number; in: number; laborers: number };
|
||||
/**
|
||||
* Which way freight actually flows here, so the pipeline can be DRAWN in that direction.
|
||||
*
|
||||
* §9.3 runs loading Green → MEN → AT → WORK → car, and unloading the other way: car → WORK → AT →
|
||||
* MEN → red. So green and red both sit beside MEN, and the car sits beside WORK. Drawing red at
|
||||
* the far right — where the car is — made an unload look like it ran backwards across the whole
|
||||
* row and then landed on the wrong end.
|
||||
*/
|
||||
allowsOut: boolean;
|
||||
allowsIn: boolean;
|
||||
/** The Modifier cards standing beside it, by name. */
|
||||
modifiers: string[];
|
||||
/**
|
||||
@@ -322,6 +332,8 @@ function facilityView(
|
||||
porters: `${portersLeft(f)}/${f.porters}`,
|
||||
canFinish: canFinishHere(f),
|
||||
jammed: f.menAtWork.some((l) => l !== null) && !canFinishHere(f),
|
||||
allowsOut: f.allows.outbound,
|
||||
allowsIn: f.allows.inbound,
|
||||
base: baseOf(card),
|
||||
modifiers: (card.modifiers ?? []).map((m) => MODIFIER_NAMES[m] ?? prettyKey(m)),
|
||||
};
|
||||
@@ -468,8 +480,20 @@ export function describeIntent(s: GameState, i: Intent): string {
|
||||
}
|
||||
case 'switch.sortConsist':
|
||||
return `re-order consist [${i.order.join(',')}]`;
|
||||
case 'freightAgent.stockOutbound':
|
||||
return `stock a ${i.carType} at ${at(i.at)}`;
|
||||
case 'freightAgent.stockOutbound': {
|
||||
/**
|
||||
* "stock a coach at (0, 0)" reads as putting a CAR on the track, and was reported as exactly
|
||||
* that confusion: no train at the Depot, so how is a coach being stocked there? It is not a
|
||||
* car on the track — it is a load taken from the Division Yard into the green Loading box,
|
||||
* waiting for a train that can carry it. For a passenger facility that load is passengers on
|
||||
* the platform.
|
||||
*/
|
||||
const f = areaOf(s, 0).grid.get(`${i.at.row},${i.at.col}`)?.facility ?? null;
|
||||
const where = f?.kind === 'passenger' ? 'onto the platform' : 'into the green Loading box';
|
||||
return i.carType === 'coach' && f?.kind === 'passenger'
|
||||
? `bring passengers ${where} at ${at(i.at)} — they wait there for a train with an empty coach`
|
||||
: `bring a ${i.carType} load ${where} at ${at(i.at)} — it waits there for a car to be spotted`;
|
||||
}
|
||||
case 'freightAgent.unjam':
|
||||
return `unjam ${i.from} at ${at(i.at)}`;
|
||||
case 'freightAgent.clearInbound':
|
||||
@@ -683,7 +707,14 @@ export function snapshot(
|
||||
const chip = trainChip(s, t.tray);
|
||||
return {
|
||||
...chip,
|
||||
label: `${chip.label} (${t.stagesRemaining})`,
|
||||
/**
|
||||
* SAY WHAT THE NUMBER IS.
|
||||
*
|
||||
* This read "TX14 (2)", a bare figure next to a train's name — and it was read as the
|
||||
* car count twice, by the same player, because that is the obvious guess. It is Stages
|
||||
* left to cross this Mainline card. Naming the unit costs three characters.
|
||||
*/
|
||||
label: `${chip.label} · ${t.stagesRemaining}⧗`,
|
||||
region: place(t),
|
||||
direction: t.direction,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user