Clarify the tutorial transition to the countdown exercise

This commit is contained in:
coyotte508 2026-10-31 23:16:51 +01:00
commit bc7a6a8a0d
6 changed files with 29 additions and 14 deletions

View file

@ -209,7 +209,7 @@ export async function mountLesson(
s.step === 2 &&
completedTurns(s.state) >= 3 &&
!s.completed;
programControls.innerHTML = `${chapter === "basics" && s.step === 3 ? transport("timeout", "clock", t("timing.next_scenario"), s.busy) : ""}${canPlay(s) ? transport("playback", playing ? "pause" : "right", playing ? t("basics.pause") : t("tutorial.play_program")) : ""}${!LESSONS[index].basics && chapter !== "first-shot" && s.step === 1 && s.state.phase === 1 ? transport("phase", "step", t("app.phase_2"), s.busy) : ""}${!LESSONS[index].basics && s.step === 1 ? `<button data-guide="run" class="primary icon-button" aria-keyshortcuts="Enter" title="${t("basics.run_program")} · ↵" aria-label="${t("basics.run_program")}" ${(chapter === "first-shot" ? !readyToFire : !planned) || s.busy ? "disabled" : ""}>${pictogram("check")}<kbd>↵</kbd></button>` : ""}`;
programControls.innerHTML = `${chapter === "basics" && s.step === 3 ? `<button data-guide="timeout" class="primary icon-label" aria-keyshortcuts="Enter" title="${t("timing.next_scenario")} · ↵" ${s.busy ? "disabled" : ""}>${pictogram("clock")}<span>${t("timing.next_scenario")}</span><kbd aria-hidden="true">↵</kbd></button>` : ""}${canPlay(s) ? transport("playback", playing ? "pause" : "right", playing ? t("basics.pause") : t("tutorial.play_program")) : ""}${!LESSONS[index].basics && chapter !== "first-shot" && s.step === 1 && s.state.phase === 1 ? transport("phase", "step", t("app.phase_2"), s.busy) : ""}${!LESSONS[index].basics && s.step === 1 ? `<button data-guide="run" class="primary icon-button" aria-keyshortcuts="Enter" title="${t("basics.run_program")} · ↵" aria-label="${t("basics.run_program")}" ${(chapter === "first-shot" ? !readyToFire : !planned) || s.busy ? "disabled" : ""}>${pictogram("check")}<kbd>↵</kbd></button>` : ""}`;
if (phaseLesson && s.state.stage === "programming" && s.step > 0) {
const ready =
s.state.game.programs[0][(s.state.phase === 1 ? 1 : 4) - 1]?.cards

View file

@ -1073,7 +1073,10 @@ export function mountConsole(root, host = null) {
return;
if (root.querySelector("dialog[open]")) return;
if (event.key === "Enter") {
const run = $("#basics-run") ?? $('[data-guide="run"]');
const run =
$("#basics-run") ??
$('[data-guide="run"]') ??
$('[data-guide="timeout"]');
if (!run || !run.getClientRects().length) return;
event.preventDefault();
if (!run.disabled && !pending && !event.repeat) run.click();

View file

@ -553,16 +553,15 @@
"timing.start_clock": "Start the clock, then plan a route to the marked room.",
"timing.plan_early": "Reach the room in two actions. Press ↵ when your program is ready.",
"timing.executing": "The clock has stopped. All three turns execute in order.",
"timing.try_deadline": "What if time runs out?",
"timing.early_done": "You finished before the deadline. Now try leaving empty slots.",
"timing.early_done": "Your route worked. Next: try an unfinished program when time runs out.",
"timing.let_time_run_out": "Let time run out",
"timing.deadline_plan": "Place the arrow, then start the last 5 seconds.",
"timing.deadline_plan": "Place one arrow. Leave the other two slots empty.",
"timing.empty_waits": "Time is up: the arrow executes, then the two empty slots wait.",
"timing.complete": "Finish early or run out of time: the whole program executes. Empty slots wait.",
"timing.stopped": "Clock stopped",
"timing.expired": "Time is up",
"timing.last_seconds": "Last 5 seconds",
"timing.next_scenario": "Try the deadline",
"timing.next_scenario": "Next: time runs out",
"timing.exercise": "Exercise: {turns} turns",
"timing.full_mission": "Full mission",
"timing.phase_group": "Phase {phase}: plan turns {first}–{last}",
@ -591,5 +590,8 @@
"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.deadline": "Phase {phase} · {time}",
"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."
}

View file

@ -553,16 +553,15 @@
"timing.start_clock": "Lancez le chrono, puis programmez le trajet vers la salle marquée.",
"timing.plan_early": "Rejoignez la salle en deux actions. Appuyez sur ↵ quand votre programme est prêt.",
"timing.executing": "Le chrono est arrêté. Les trois tours s’exécutent à la suite.",
"timing.try_deadline": "Et si le temps s’écoule ?",
"timing.early_done": "Vous avez terminé avant la fin du chrono. Essayons maintenant avec des cases vides.",
"timing.early_done": "Votre trajet a réussi. Ensuite : essayez un programme incomplet à la fin du chrono.",
"timing.let_time_run_out": "Laisser le temps s’écouler",
"timing.deadline_plan": "Placez la flèche, puis lancez les 5 dernières secondes.",
"timing.deadline_plan": "Placez une flèche. Laissez les deux autres cases vides.",
"timing.empty_waits": "Temps écoulé : la flèche s’exécute, puis les deux cases vides font attendre.",
"timing.complete": "Prêt avant la fin ou temps écoulé : tout le programme s’exécute. Les cases vides font attendre.",
"timing.stopped": "Chrono arrêté",
"timing.expired": "Temps écoulé",
"timing.last_seconds": "5 dernières secondes",
"timing.next_scenario": "Essayer la fin du chrono",
"timing.next_scenario": "Suite : temps écoulé",
"timing.exercise": "Exercice : {turns} tours",
"timing.full_mission": "Mission complète",
"timing.phase_group": "Phase {phase} : programmer les tours {first} à {last}",
@ -591,5 +590,8 @@
"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.deadline": "Phase {phase} · {time}",
"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."
}

View file

@ -2387,6 +2387,7 @@ input:not([type="checkbox"]):not([type="range"]) {
.native-tutorial.learning-basics[data-tutorial-stage="resolution"] #replay label,
.native-tutorial.learning-basics[data-tutorial-stage="resolution"] #replay #live { display: none; }
.native-tutorial.learning-basics[data-tutorial-step="3"] #controls { display: none !important; }
.native-tutorial.learning-basics[data-tutorial-step="3"] #replay { display: none !important; }
.training-ship .deck-upper .station,
.training-ship .deck-lower .station { min-height: 104px; }

View file

@ -235,14 +235,21 @@ export async function createLessonTutorial(
? [
{
id: "deadline-intro",
title: t("timing.try_deadline"),
title: t("timing.destination_reached"),
text: t("timing.early_done"),
complete: (state) => state.tutorial.scenario === "deadline",
},
{
id: "deadline-plan",
title: t("timing.let_time_run_out"),
text: t("timing.deadline_plan"),
text: (state) =>
t(
state.tutorial.clockRunning
? "timing.deadline_running"
: state.game.programs[0].some((slot) => slot?.cards?.length)
? "timing.deadline_ready"
: "timing.deadline_plan",
),
complete: (state) => state.stage === "resolution",
},
{