From 0d33e09799e28b9b56fdbb44c6770cc53cd3b891 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 20 Oct 2026 19:49:30 +0100 Subject: [PATCH] Recipe inputs show have / need Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 8 ++++++++ static/app.js | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..b7dedf7 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,8 @@ +# Guildhall + +## UI rules + +- Every requirement/progress ratio is **have / need** (e.g. `0 / 1` when one is + needed and none is held) — recipe inputs, building costs, order slots, gold, + tooltips, server messages. Never `need / have`. +- In-game text is terse: icons and numbers over prose, details in tooltips. diff --git a/static/app.js b/static/app.js index c8dbf0f..a6f96dd 100644 --- a/static/app.js +++ b/static/app.js @@ -400,9 +400,10 @@ function pageHtml() { return ({ town, council, orders, board, roster, bank }[page] || town)(); } +// Recipe input as "have / need"; without `have`, just the quantity. function itemChip(id, qty, have) { const short = have !== undefined && have < qty; - return `${item(id).icon} ${fmt(qty)}${have !== undefined ? ` / ${fmt(have)}` : ""}`; + return `${item(id).icon} ${have !== undefined ? `${fmt(have)} / ${fmt(qty)}` : fmt(qty)}`; } // Progress towards a building cost: "have / need".