A town simulation in pale isometric line art, implemented with Ritmo ECS and PixiJs 3D
The town panel's needs bars name each need by its icon
SandroMaglione8cacbc91578e
diff --git a/src/factory.css b/src/factory.cssindex 7a0087d..ac73d61 100644--- a/src/factory.css+++ b/src/factory.css@@ -225,7 +225,7 @@ body { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;.panel .effect.up { color: #4f8a3e; }.panel .effect.down { color: #b04a39; }.panel .effect.outlook { text-align: left; }-.panel .need { display: grid; grid-template-columns: 7.5ch 1fr 7ch; align-items: center; gap: 10px; padding: 4px 0; }+.panel .need { display: grid; grid-template-columns: 16px 1fr 7ch; align-items: center; gap: 10px; padding: 4px 0; }.panel .need .track { height: 8px; background: #e6e9e2; border-radius: 4px; overflow: hidden; }.panel .need .fill { display: block; height: 100%; background: #6e8f36; border-radius: 4px; }.panel .need .fill.low { background: #c98a3a; }diff --git a/src/host.ts b/src/host.tsindex d603e72..9a49407 100644--- a/src/host.ts+++ b/src/host.ts@@ -1086,9 +1086,11 @@ export const createHost = async (}const bars = (["food", "bread", "cloth", "faith", "furniture"] as const).map((n) => {const line = el("div", "need")+ // The icon alone says which need: the name is its tooltip, so no word runs under the bar.const label = el("span", "label")label.innerHTML = icon(needIcons[n], 16)- label.append(document.createTextNode(needTitle[n]))+ label.title = needTitle[n]+ label.setAttribute("aria-label", needTitle[n])const track = el("span", "track")const fill = el("span", "fill")track.append(fill)