Fittings tab marks what the town already has

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-26 08:27:50 +00:00
parent e6702871ff
commit 2996d7a9d7
2 changed files with 13 additions and 1 deletions

View file

@ -6080,6 +6080,9 @@ ORDER_RECIPES, ORDER_RAW = _order_sources()
# What changed, shown on the Patch notes page. Newest first; every shipped change adds a # What changed, shown on the Patch notes page. Newest first; every shipped change adds a
# line here (new / balance / fix), and a new release a new entry on top. # line here (new / balance / fix), and a new release a new entry on top.
PATCH_NOTES = [ PATCH_NOTES = [
{"date": "2026-10-26", "title": "Fittings", "notes": [
("new", "Construction › Fittings: ✓ Fitted on the ones the town already has (✓ Paused while the building is damaged)."),
]},
{"date": "2026-10-25", "title": "Titles", "notes": [ {"date": "2026-10-25", "title": "Titles", "notes": [
("new", "🏆 Achievements (under You): 127 to collect. Masterwork patterns per dungeon (7 each), the 7 uniques, titles, " ("new", "🏆 Achievements (under You): 127 to collect. Masterwork patterns per dungeon (7 each), the 7 uniques, titles, "
"boss emblems, caravan looks, home. Tap an icon for what it is and how to get it. Nothing is awarded there, it only keeps track."), "boss emblems, caravan looks, home. Tap an icon for what it is and how to get it. Nothing is awarded there, it only keeps track."),

View file

@ -882,6 +882,15 @@ function needTag(id) {
return n ? `<span class="tag gold" title="${esc(`City needs ${fmt(n.qty)} ${item(id).name}\n${n.why.join("\n")}`)}">🏘️ ${fmt(n.qty)}</span>` : ""; return n ? `<span class="tag gold" title="${esc(`City needs ${fmt(n.qty)} ${item(id).name}\n${n.why.join("\n")}`)}">🏘️ ${fmt(n.qty)}</span>` : "";
} }
// A fitting the town already has: working, or paused while its building is damaged.
function fittedTag(id) {
const f = C.fittings.find((x) => x.id === id), b = f && S.city.buildings[f.building];
if (!b?.fittings.includes(id)) return "";
const where = `${C.buildings[f.building].icon} ${C.buildings[f.building].name}`;
return b.damaged ? `<span class="tag bad" title="${esc(`Fitted in the ${where}, paused until it's repaired`)}">✓ Paused</span>`
: `<span class="tag good" title="${esc(`Fitted in the ${where}`)}">✓ Fitted</span>`;
}
// --- skill pages ---------------------------------------------------------- // --- skill pages ----------------------------------------------------------
function skillPage(id) { function skillPage(id) {
@ -1695,7 +1704,7 @@ function actionCard(a) {
return ` return `
<div class="action ${active || second ? "active" : ""} ${locked ? "locked" : ""}"> <div class="action ${active || second ? "active" : ""} ${locked ? "locked" : ""}">
<div class="top"><div class="ico">${icon}</div><div> <div class="top"><div class="ico">${icon}</div><div>
<div class="name">${esc(a.name)} ${Object.keys(a.outputs).map(needTag).join("")}</div> <div class="name">${esc(a.name)} ${Object.keys(a.outputs).map((id) => needTag(id) + fittedTag(id)).join("")}</div>
<div class="sub">Level ${a.level} · ${dur(time)} · ${a.xp} XP</div> <div class="sub">Level ${a.level} · ${dur(time)} · ${a.xp} XP</div>
</div>${Object.keys(a.inputs).length ? `<button class="pin ${me.tracked === a.id ? "on" : ""}" data-track="${a.id}" title="${me.tracked === a.id ? "Untrack" : "Track"}">📌</button>` : ""}</div> </div>${Object.keys(a.inputs).length ? `<button class="pin ${me.tracked === a.id ? "on" : ""}" data-track="${a.id}" title="${me.tracked === a.id ? "Untrack" : "Track"}">📌</button>` : ""}</div>
${io ? `<div class="io">${io}</div>` : ""} ${io ? `<div class="io">${io}</div>` : ""}