diff --git a/static/app.js b/static/app.js index f8e89c1..d533c04 100644 --- a/static/app.js +++ b/static/app.js @@ -2023,13 +2023,12 @@ function moodStat() { function moodPanel() { const h = S.city.happiness, e = h.effects; - const x = (v) => `ร—${+v.toFixed(2)}`; const needs = Object.entries(h.needs).map(([key, n]) => `
${NEED_NAMES[key][0]} ${NEED_NAMES[key][1]}${pct(n.score)}
${n.rows.map(reqRow).join("")}
`).join(""); const locked = h.locked.map((key) => `๐Ÿ”’ ${NEED_NAMES[key][1]} ยท ${NEED_TIERS[key]}`).join(""); const mods = h.mods.map((m) => `${esc(m.name)} ${m.value > 0 ? "+" : "โˆ’"}${pct(Math.abs(m.value))}`).join(""); - const effects = [`๐ŸŒฑ Growth ${x(e.growth)}`, `๐Ÿ›ก๏ธ Guards ${x(e.militia)}`, `๐Ÿ”จ Labour ${x(e.work)}`, `${COIN} Taxes ${x(e.work)}`, + const effects = [`๐ŸŒฑ Growth ${pct(e.growth)}`, `๐Ÿ›ก๏ธ Guards ${pct(e.militia)}`, `๐Ÿ”จ Labour ${pct(e.work)}`, `${COIN} Taxes ${pct(e.work)}`, ...(e.leave ? [`๐Ÿšถ ${pct(e.leave)} leave a day`] : [])]; return `

${h.icon} Townsfolk ยท ${h.name}

diff --git a/static/styles.css b/static/styles.css index 9ca0131..0daff08 100644 --- a/static/styles.css +++ b/static/styles.css @@ -293,7 +293,7 @@ select { background: var(--bg); border: 1px solid var(--line); border-radius: 8p .vs { display: flex; gap: 12px; align-items: center; margin: 12px 0 4px; } .vs .side { flex: 1; text-align: center; padding: 10px; border-radius: 8px; background: var(--panel-2); } .vs .side b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; } -.req { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 10px; align-items: center; margin-bottom: 10px; } +.req { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: minmax(27px, auto) auto; gap: 4px 10px; align-items: center; margin-bottom: 10px; } .req .bar { grid-column: 2 / 4; } table.parts { width: 100%; border-collapse: collapse; font-size: 14px; } table.parts td { padding: 4px 0; border-bottom: 1px solid var(--line); }