${threatPortrait(th)}${symbol("speed", `${th.speed} ${t("app.spaces_per_turn")}`, th.speed)}
${th.position === "internal" ? esc(th.stations.map((s) => stationLabel(s, locale)).join(", ")) + " · " + esc(label(th.repair)) : esc(zoneName(th.zone))}
${traitDescriptions(
th,
locale,
)
@@ -524,8 +524,8 @@ export function mountConsole(root, host = null) {
const routeDescription = destination
? `${t("route.planned", { turn: slot.turn, room: stationLabel(destination, locale) })}. ${t("route.assumption")}`
: "";
- const description = `T+${slot.turn} · ${slot.cards.map((c) => (c.sides ? c.sides[c.side].map(label).join(" → ") : c.category === "movement" ? t("app.movement") : t("app.action"))).join(" + ") || t("app.empty")}`;
- return ``;
+ const description = `T${slot.turn} · ${slot.cards.map((c) => (c.sides ? c.sides[c.side].map(label).join(" → ") : c.category === "movement" ? t("app.movement") : t("app.action"))).join(" + ") || t("app.empty")}`;
+ return ``;
})
.join("");
showPlannedPosition(previewTurn);
@@ -677,13 +677,13 @@ export function mountConsole(root, host = null) {
.join("")
: "";
$("#replay").innerHTML = resolution
- ? `${resolution.outcome ? `${resolution.outcome.survived ? "✓" : "✕"} ${t("app.score")} : ${resolution.outcome.score} · ${resolution.outcome.threatPoints} ${t("app.threats_87b951")} + ${resolution.outcome.visual} ${t("app.visual")} − ${resolution.outcome.penalties} ${t("app.penalties")}` : `T+${resolution.turn} · ${esc({ appear: t("app.appearances"), crew: t("app.crew_actions"), damage: t("app.damage"), threats: t("app.threat_actions"), computer: t("app.computer") }[resolution.step])}`}
${replayFrame !== null ? '" : ""}`
+ ? `${resolution.outcome ? `${resolution.outcome.survived ? "✓" : "✕"} ${t("app.score")} : ${resolution.outcome.score} · ${resolution.outcome.threatPoints} ${t("app.threats_87b951")} + ${resolution.outcome.visual} ${t("app.visual")} − ${resolution.outcome.penalties} ${t("app.penalties")}` : `T${resolution.turn} · ${esc({ appear: t("app.appearances"), crew: t("app.crew_actions"), damage: t("app.damage"), threats: t("app.threat_actions"), computer: t("app.computer") }[resolution.step])}`}
${replayFrame !== null ? '" : ""}`
: "";
renderCampaign(g?.campaign);
$("#announcements").innerHTML = resolution
? resolution.log
.filter((_, i) => !frame || i < frame.logEnd)
- .map((e) => `T+${e.turn} · ${esc(logText(e))}`)
+ .map((e) => `T${e.turn} · ${esc(logText(e))}`)
.join("")
: announcements
.map(
@@ -759,13 +759,13 @@ export function mountConsole(root, host = null) {
group.positions.includes(n),
);
const group = groups[groupIndex];
- const description = `${mark ? effects.map((effect) => effectDescription(effect, locale)).join(" · ") || t("app.no_effect") : t("app.space") + " " + n}${group ? ` · T+${group.turn} · ${projection}` : ""}`;
+ const description = `${mark ? effects.map((effect) => effectDescription(effect, locale)).join(" · ") || t("app.no_effect") : t("app.space") + " " + n}${group ? ` · T${group.turn} · ${projection}` : ""}`;
const current = !pending && th.positionOnTrack === n;
return `${appearance ? `${pictogram(appearance.icon)}${esc(appearance.value)}` : current ? "●" : ""}`;
})
.join(
"",
- )}${groups.length ? `T+${groups.map((group, i) => `${group.turn}`).join("")}
` : ""}${pictogram("ship")}`;
+ )}${groups.length ? `T${groups.map((group, i) => `${group.turn}`).join("")}
` : ""}${pictogram("ship")}`;
}
function logText(e) {
return eventDescription(
@@ -1540,7 +1540,8 @@ export function mountConsole(root, host = null) {
setInterval(() => {
if (!view) return;
const paused = view.tutorial && !view.tutorial.clockRunning;
- const now = view.serverNow + (paused ? 0 : performance.now() - received);
+ const elapsed = performance.now() - received;
+ const now = view.serverNow + (paused ? 0 : elapsed);
const end =
view.stage === "presence"
? view.players[seat]?.readyUntil
@@ -1551,13 +1552,19 @@ export function mountConsole(root, host = null) {
: now;
const practiceTime = $("[data-practice-time]");
if (practiceTime) {
- const text = practiceClockText(
- view,
- locale,
- performance.now() - received,
- );
+ const text = practiceClockText(view, locale, elapsed);
if (practiceTime.textContent !== text) practiceTime.textContent = text;
}
+ const phaseTime = $("[data-practice-phase]");
+ if (phaseTime && view.stage === "programming") {
+ const text = t("phases.deadline", {
+ phase: view.phase,
+ time: duration(
+ view.missionStartAt + view.mission.phaseEndsMs[view.phase - 1] - now,
+ ),
+ });
+ if (phaseTime.textContent !== text) phaseTime.textContent = text;
+ }
$("#clock").textContent = paused
? t("app.paused_afa0b8")
: view.stage === "presence" && !view.players[seat]?.ready
diff --git a/preview/basics.js b/preview/basics.js
index 2fbbbac..bb7ec3b 100644
--- a/preview/basics.js
+++ b/preview/basics.js
@@ -68,7 +68,7 @@ export function basicsView(view, locale, { started, picked, shipMarkup }) {
${
intro
? btn("basics-start", t("basics.try_with_two_cards"))
- : `${pictogram("cards")}${t("basics.program")}${pictogram("right")}
${[1, 2, 3].map((n) => ``).join("")}
+ : `${pictogram("cards")}${t("basics.program")}${pictogram("right")}
${[1, 2, 3].map((n) => ``).join("")}
${!playing ? `${pictogram("cards")} ${placed}/2 ${["red", "blue"].map((action) => ``).join("")}
` : ""}
${!playing && ready ? `${practiceClockText(view, locale)}${t("basics.to_plan_safe_practice")}
` : ""}
${playing ? (turn < 3 ? `` : `${t("basics.planning_against_a_clock_and_carrying_out_turns")}
`) : ""}`
diff --git a/preview/locales/en.json b/preview/locales/en.json
index 53e7ce5..deff66b 100644
--- a/preview/locales/en.json
+++ b/preview/locales/en.json
@@ -437,7 +437,7 @@
"text.simultaneous_repair_attempted": "Simultaneous repair attempted",
"text.repair": "Repair {value1} · {value2}",
"text.final_action_lost": "; final action lost",
- "text.program_delayed_from_t": "Program delayed from T+{from}{value1}",
+ "text.program_delayed_from_t": "Program delayed from T{from}{value1}",
"text.knocked_out": "Knocked out · {value1}",
"text.no_effect": "No effect · {value1}",
"text.damage": "Damage {value1} · {value2}",
@@ -587,10 +587,11 @@
"overview.play": "Play the whole mission",
"overview.play_detail": "Every turn, in order. No more planning.",
"overview.turns": "Full mission · 12 turns",
- "route.planned": "Planned position after T+{turn}: {room}",
+ "route.planned": "Planned position after T{turn}: {room}",
"route.assumption": "Intended route without disruptions: delays, threats or a busy lift may change it.",
"timing.deadline_shortcuts": "Arrows: move · Backspace: undo",
"phases.deadline": "Phase {phase} · {time}",
+ "phases.total": "Total",
"timing.destination_reached": "Destination reached",
"timing.deadline_ready": "Start the last 5 seconds. Let the clock run out.",
"timing.deadline_running": "Wait for zero: your unfinished program will execute automatically."
diff --git a/preview/locales/fr.json b/preview/locales/fr.json
index eb93797..7d920f7 100644
--- a/preview/locales/fr.json
+++ b/preview/locales/fr.json
@@ -437,7 +437,7 @@
"text.simultaneous_repair_attempted": "Réparation simultanée tentée",
"text.repair": "Répare {value1} · {value2}",
"text.final_action_lost": " ; dernière action perdue",
- "text.program_delayed_from_t": "Programme décalé à partir de T+{from}{value1}",
+ "text.program_delayed_from_t": "Programme décalé à partir de T{from}{value1}",
"text.knocked_out": "Assommé · {value1}",
"text.no_effect": "Sans effet · {value1}",
"text.damage": "Dégât {value1} · {value2}",
@@ -587,10 +587,11 @@
"overview.play": "Exécuter toute la mission",
"overview.play_detail": "Tous les tours, dans l’ordre. Plus de programmation.",
"overview.turns": "Mission complète · 12 tours",
- "route.planned": "Position prévue après T+{turn} : {room}",
+ "route.planned": "Position prévue après T{turn} : {room}",
"route.assumption": "Trajet prévu, sans perturbations : retards, menaces ou ascenseur occupé peuvent le modifier.",
"timing.deadline_shortcuts": "Flèches : se déplacer · Retour arrière : annuler",
"phases.deadline": "Phase {phase} · {time}",
+ "phases.total": "Total",
"timing.destination_reached": "Destination atteinte",
"timing.deadline_ready": "Lancez les 5 dernières secondes. Laissez le chrono arriver à zéro.",
"timing.deadline_running": "Attendez zéro : votre programme incomplet s’exécutera automatiquement."
diff --git a/preview/style.css b/preview/style.css
index b981fa1..bdc14b5 100644
--- a/preview/style.css
+++ b/preview/style.css
@@ -2576,6 +2576,7 @@ input:not([type="checkbox"]):not([type="range"]) {
.practice-clock.stopped > svg { width: 22px; height: 22px; color: var(--cyan); }
.phase-lesson-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.phase-lesson-controls .practice-clock { margin: 0; min-width: 225px; }
+.phase-lesson-controls .practice-clock small { color: var(--muted); }
.native-tutorial[data-chapter="planning-phases"] #threats { display: block !important; }
.native-tutorial[data-chapter="planning-phases"] .tactical .section-heading:has(#threat-title) { display: flex !important; }
.native-tutorial[data-chapter="planning-phases"] #program { display: grid; grid-template-columns: repeat(4, minmax(0, 70px)); gap: 14px 10px; }