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".