Distinguish weapon power from health and remove duplicate arrival text
This commit is contained in:
parent
2bfe5f8f0b
commit
97260eb542
2 changed files with 2 additions and 3 deletions
|
|
@ -2502,7 +2502,6 @@ input:not([type="checkbox"]):not([type="range"]) {
|
|||
.lesson-target { margin-top: 24px; max-width: 340px; }
|
||||
.lesson-target .section-heading { margin-bottom: 10px; }
|
||||
.pending-threat > .equipment-art { opacity: .35; }
|
||||
.threat-pending { position: absolute; top: 68px; right: 10px; color: var(--muted); font-size: 12px; }
|
||||
.lesson-target .hull-gauge { border-color: #74e8bd; }
|
||||
/* Discovery introduces the target before exposing editable program controls. */
|
||||
.native-tutorial[data-chapter="first-shot"][data-tutorial-step="0"] #planning {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ export function createTacticalView({
|
|||
const details = (key, art, text, extra = "") =>
|
||||
`<template>${key === "B" ? "" : `<div class="system-detail-art">${illustration(art)}</div>`}<p class="room-location">${esc(zoneName(zone))} · ${deck === "upper" ? t("Pont supérieur", "Upper deck") : t("Pont inférieur", "Lower deck")}</p>${extra}<p>${esc(actionWords(text))}</p><p class="planning-note">${t(`Programmez ${actionName(key)} à un tour où votre équipier sera dans cette salle. Une panne de ce système fait utiliser l’action pour la réparer.`, `Program ${actionName(key)} on a turn when your crew member will be in this room. A malfunction of this system makes the action repair it instead.`)}</p>${canPlan ? `<button class="primary icon-label" data-pick-action="${key}"><span class="action-key">${pictogram(key)}</span>${t(`Voir mes cartes ${actionName(key)}`, `Show my ${actionName(key)} cards`)}</button>` : ""}</template>`;
|
||||
return `<div class="systems illustrated-systems">
|
||||
<div class="system-card weapon-system"><button title="${esc(weapon)}" data-inspect="system-${station}-A" data-inspect-title="${esc(weapon)}" aria-haspopup="dialog" aria-label="${esc(`${weapon} · ${t("Puissance", "Power")} ${power}`)}"><span class="action-key">${pictogram("A")}</span>${illustration(weaponArt)}<span class="system-caption"><strong>${t("Tirer", "Fire")}</strong><span class="power-value">${symbol("hull", t("Puissance de tir", "Firepower"), power)}</span></span></button>${details("A", weaponArt, fireText, `<div class="weapon-facts">${symbol("hull", `${t("Puissance", "Power")} ${power}`, power)}${symbol(light ? "check" : "reactor", light ? t("Batterie autonome", "Own battery") : t("Coût : 1 énergie", "Cost: 1 energy"), light ? t("Autonome", "Own battery") : "−1")}</div>`)}</div>
|
||||
<div class="system-card weapon-system"><button title="${esc(weapon)}" data-inspect="system-${station}-A" data-inspect-title="${esc(weapon)}" aria-haspopup="dialog" aria-label="${esc(`${weapon} · ${t("Puissance", "Power")} ${power}`)}"><span class="action-key">${pictogram("A")}</span>${illustration(weaponArt)}<span class="system-caption"><strong>${t("Tirer", "Fire")}</strong><span class="power-value">${symbol("laser", t("Puissance de tir", "Firepower"), power)}</span></span></button>${details("A", weaponArt, fireText, `<div class="weapon-facts">${symbol("laser", `${t("Puissance de tir", "Firepower")} ${power}`, power)}${symbol(light ? "check" : "reactor", light ? t("Batterie autonome", "Own battery") : t("Coût : 1 énergie", "Cost: 1 energy"), light ? t("Autonome", "Own battery") : "−1")}</div>`)}</div>
|
||||
<div class="system-card energy-system ${s[system] === 0 ? "depleted" : ""}"><button data-inspect="system-${station}-B" data-inspect-title="${esc(charge)}" aria-haspopup="dialog" aria-label="${esc(`${charge} · ${s[system]}/${capacity}`)}"><span class="action-key">${pictogram("B")}</span>${illustration(system)}<span class="system-caption"><strong>${t("Charger", "Charge")}</strong><b class="energy-value">${s[system]}/${capacity}</b>${meter(s[system], capacity)}</span></button>${details("B", system, chargeText, flow)}</div>
|
||||
<div class="system-card special-system"><button title="${esc(c)}" data-inspect="system-${station}-C" data-inspect-title="${esc(c)}" aria-haspopup="dialog" aria-label="${esc(c)}"><span class="action-key">${pictogram("C")}</span>${illustration(cIcon)}<span class="system-caption"><strong>${esc(c)}</strong></span></button>${details("C", cIcon, cText)}</div>
|
||||
</div>`;
|
||||
|
|
@ -194,7 +194,7 @@ export function createTacticalView({
|
|||
.join(", ")}`
|
||||
: `${t("Trajectoire", "Trajectory")} : ${zoneName(th.zone)}`;
|
||||
const target = `<span class="threat-target" style="--zone:var(--${["red", "white", "blue"].includes(th.zone) ? th.zone : "cyan"})" role="img" aria-label="${esc(targetName)}" title="${esc(targetName)}">${shipLocator(stations, internal ? null : th.zone)}</span>`;
|
||||
return `<span class="threat-portrait ${pending ? "pending-threat" : ""} ${gone ? "resolved-threat" : ""}">${target}${visual}<span class="threat-hud"><span class="hull-gauge"><span>${symbol("hull", `${t("Points de vie", "Hit points")} : ${hp}/${th.hp}`, `<b>${hp}<small>/${th.hp}</small></b>`)}</span><span class="hull-bar"><i style="width:${Math.max(0, Math.min(100, (hp / Math.max(1, th.hp)) * 100))}%"></i></span></span><span class="shield-badge">${symbol("shield", `${t("Bouclier", "Shield")} : ${th.shield}`, `<b>${th.shield}</b>`)}</span></span>${pending ? `<span class="threat-pending">${t("À venir", "Incoming")}</span>` : ""}${status ? `<span class="threat-outcome">${esc(status)}</span>` : ""}</span>`;
|
||||
return `<span class="threat-portrait ${pending ? "pending-threat" : ""} ${gone ? "resolved-threat" : ""}">${target}${visual}<span class="threat-hud"><span class="hull-gauge"><span>${symbol("hull", `${t("Points de vie", "Hit points")} : ${hp}/${th.hp}`, `<b>${hp}<small>/${th.hp}</small></b>`)}</span><span class="hull-bar"><i style="width:${Math.max(0, Math.min(100, (hp / Math.max(1, th.hp)) * 100))}%"></i></span></span><span class="shield-badge">${symbol("shield", `${t("Bouclier", "Shield")} : ${th.shield}`, `<b>${th.shield}</b>`)}</span></span>${status ? `<span class="threat-outcome">${esc(status)}</span>` : ""}</span>`;
|
||||
}
|
||||
return { shipCutaway, threatPortrait };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue