Clarify programmed slots and compact tutorial layout with removal sounds
This commit is contained in:
parent
a663dbaf45
commit
88b03bbe52
3 changed files with 34 additions and 4 deletions
|
|
@ -478,7 +478,7 @@ export function mountConsole(root, host = null) {
|
|||
!own.finishedPlanning &&
|
||||
phaseFor(slot.turn) === ownPhase;
|
||||
const description = `T+${slot.turn} · ${slot.cards.map((c) => (c.sides ? c.sides[c.side].map(label).join(" → ") : c.category === "movement" ? t("Déplacement", "Movement") : t("Action", "Action"))).join(" + ") || t("Vide", "Empty")}`;
|
||||
return `<button class="slot ${basic && resolution && slot.turn === (resolution.step === "damage" ? resolution.turn : Math.max(0, resolution.turn - 1)) ? "current" : ""} ${phaseFor(slot.turn) < ownPhase ? "locked" : ""} ${phaseFor(slot.turn) > ownPhase ? "future" : ""}" data-turn="${slot.turn}" ${editable ? "" : "disabled"} title="${esc(description)}" aria-label="${esc(description)}"><span class="turn">T+${slot.turn} ${phaseFor(slot.turn) < ownPhase ? pictogram("lock") : ""}</span><span class="action">${slot.cards.map((c) => (c.sides ? c.sides[c.side].map(icon).join(" ") : pictogram(c.category === "movement" ? "move" : "cards"))).join(" + ") || pictogram("wait")}</span></button>`;
|
||||
return `<button class="slot ${slot.cards.length ? "filled" : "empty"} ${basic && resolution && slot.turn === (resolution.step === "damage" ? resolution.turn : Math.max(0, resolution.turn - 1)) ? "current" : ""} ${phaseFor(slot.turn) < ownPhase ? "locked" : ""} ${phaseFor(slot.turn) > ownPhase ? "future" : ""}" data-turn="${slot.turn}" ${editable ? "" : "disabled"} title="${esc(description)}" aria-label="${esc(description)}"><span class="turn">T+${slot.turn} ${phaseFor(slot.turn) < ownPhase ? pictogram("lock") : ""}</span><span class="action">${slot.cards.map((c) => (c.sides ? c.sides[c.side].map(icon).join(" ") : pictogram(c.category === "movement" ? "move" : "cards"))).join(" + ") || pictogram("wait")}</span></button>`;
|
||||
})
|
||||
.join("");
|
||||
$("#program").setAttribute("aria-keyshortcuts", "ArrowLeft ArrowRight ArrowUp ArrowDown Backspace");
|
||||
|
|
@ -906,6 +906,7 @@ export function mountConsole(root, host = null) {
|
|||
throw Error("Only your own seat can send commands");
|
||||
const result = await host.command({ type, sequence: view.nextSequence, ...extra });
|
||||
if (type === "program") host.cue?.("place");
|
||||
if (type === "remove") host.cue?.("remove");
|
||||
return result;
|
||||
}
|
||||
const s =
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export function createSoundDesign() {
|
|||
if (!enabled || !context || context.state !== "running") return;
|
||||
const notes = {
|
||||
select: [[660, 0, .045]], place: [[440, 0, .065], [660, .06, .09]],
|
||||
remove: [[520, 0, .06], [310, .055, .09]],
|
||||
start: [[330, 0, .09], [440, .1, .09], [660, .2, .14]],
|
||||
turn: [[300, 0, .07], [450, .08, .12]], wait: [[260, 0, .13]],
|
||||
complete: [[440, 0, .1], [550, .12, .1], [660, .24, .22]],
|
||||
|
|
|
|||
|
|
@ -2353,10 +2353,10 @@ input:not([type="checkbox"]):not([type="range"]) {
|
|||
.practice-readiness > span { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.native-tutorial.learning-basics .flight-layout { display: grid !important; margin: 0; align-items: start; }
|
||||
.native-tutorial.learning-basics #planning { min-width: 0; }
|
||||
.native-tutorial.learning-basics #program { display: flex; gap: 12px; border-left: 3px solid #e6b66b; padding: 12px; background: #101e28; }
|
||||
.native-tutorial.learning-basics #program .slot { flex: 0 0 72px; min-height: 90px; }
|
||||
.native-tutorial.learning-basics #program { display: flex; gap: 10px; border: 0; padding: 0; background: transparent; }
|
||||
.native-tutorial.learning-basics #program .slot { flex: 0 0 88px; min-height: 104px; }
|
||||
.native-tutorial.learning-basics #program .slot.current { border-color: #74e8bd; box-shadow: 0 0 0 2px #74e8bd55; }
|
||||
.native-tutorial.learning-basics #hand { grid-template-columns: repeat(3, 80px); }
|
||||
.native-tutorial.learning-basics #hand { grid-template-columns: repeat(3, 88px); gap: 10px; margin-top: 12px; }
|
||||
.native-tutorial.learning-basics #hand .card { min-height: 68px; }
|
||||
.native-tutorial.learning-basics #program-crew,
|
||||
.native-tutorial.learning-basics .crew-tabs,
|
||||
|
|
@ -2418,3 +2418,31 @@ input:not([type="checkbox"]):not([type="range"]) {
|
|||
.native-tutorial .practice-readiness #basics-run { margin-left: 12px; }
|
||||
.native-tutorial .practice-clock { margin: 12px 0; padding: 12px; gap: 12px; }
|
||||
.native-tutorial .practice-clock strong { font-size: 1rem; }
|
||||
|
||||
/* Keep the exercise controls within reach of the ship, even on wide screens. */
|
||||
.native-tutorial.learning-basics .flight-layout {
|
||||
grid-template-columns: minmax(0, 600px) minmax(260px, 320px);
|
||||
justify-content: start;
|
||||
gap: 28px;
|
||||
}
|
||||
.native-guide .basics-stages { max-width: 948px; }
|
||||
.native-guide-top { max-width: 948px; }
|
||||
.slot.filled {
|
||||
background: #23463f;
|
||||
border: 2px solid #74e8bd;
|
||||
color: #d8fff0;
|
||||
}
|
||||
.slot.filled::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
width: 18px;
|
||||
height: 4px;
|
||||
border-radius: 2px;
|
||||
background: #74e8bd;
|
||||
}
|
||||
.slot.empty { border-style: dashed; }
|
||||
.slot.empty .action { opacity: .45; }
|
||||
@media (max-width: 800px) {
|
||||
.native-tutorial.learning-basics .flight-layout { grid-template-columns: 1fr; gap: 20px; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue