Show the whole Division mainline. district now has option for auto hiding on phases where not needed. scaffold for multi-player geometry showing division. regions on mainline cards implemented. bug fix on laying rail cards. optimized replay (carried links forward). Add sounds, first pass

This commit is contained in:
Jesse
2026-08-04 11:26:18 -04:00
parent ec792dfc15
commit c3c5c59a45
16 changed files with 1249 additions and 129 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ function enterMainline(
tray.direction,
node.gradeUp ?? 'east',
);
node.transits.push({ tray: id, stagesRemaining: stages, direction: tray.direction });
node.transits.push({ tray: id, stagesRemaining: stages, stagesTotal: stages, direction: tray.direction });
tray.position = { at: 'mainline', index };
}
+18 -1
View File
@@ -228,7 +228,24 @@ export type CrewTray = {
* A train part-way across a Mainline card. Crossing time is measured in STAGES (Q1/Q2), so the
* regions the placeholder used are gone — the cells printed on the cards are decoration.
*/
export type Transit = { tray: TrayId; stagesRemaining: number; direction: Direction };
/**
* A train crossing a Mainline card.
*
* `stagesTotal` is what the crossing cost when the train ENTERED, and it exists so the Division map
* can say where on the card a train is. §2.1 divides a Mainline card into two regions and §8.2 has
* a train move one region per Stage; the engine models crossing as a countdown of Stages instead,
* so position has to be derived — and it cannot be recomputed later, because a modifier played onto
* the card mid-crossing would change the answer and make the train appear to jump backwards.
*
* Read by nothing that decides anything: no legality check, no movement, no bot. It records what
* already happened so the picture can be drawn.
*/
export type Transit = {
tray: TrayId;
stagesRemaining: number;
stagesTotal: number;
direction: Direction;
};
export type DivisionNode =
| { kind: 'divisionPoint'; side: Direction; holding: TrayId[] }