Enlarge building effect badges and remove signs

This commit is contained in:
coyotte508 2026-10-26 21:09:47 +01:00
commit 30c6cb1b24
2 changed files with 9 additions and 7 deletions

View file

@ -2842,8 +2842,9 @@ body:has(.pr-game) {
justify-content: flex-end;
gap: 2px 5px;
margin-left: auto;
max-width: 45%;
font-size: 12px;
max-width: 55%;
font-size: 15px;
font-weight: 600;
}
.pr-game .current-building-effect > span {
display: inline-flex;
@ -2851,13 +2852,14 @@ body:has(.pr-game) {
white-space: nowrap;
gap: 1px;
}
.pr-game .current-building-effect .metric {
.pr-game .building-face .current-building-effect .metric {
font-size: 15px;
margin: 0;
gap: 2px;
}
.pr-game .current-building-effect .icon {
width: 18px;
height: 18px;
.pr-game .building-face .current-building-effect .icon {
width: 24px;
height: 24px;
}
.pr-game .current-building-effect.inactive {
opacity: 0.4;

View file

@ -622,7 +622,7 @@ export function mountGame(
const effect = effects[i];
if (!effect?.items.length) return "";
const label = `${t.effect(a.buildings[i].id)}${effect.enabled ? "" : ` · ${t("workerSpaces")}: 0/${B[a.buildings[i].id].workers}`}`;
return `<span class="current-building-effect ${effect.enabled ? "" : "inactive"}" title="${esc(label)}" aria-label="${esc(label)}">${effect.items.map((x) => `<span>${x.sign}${metric(x.icon, x.value)}</span>`).join("")}</span>`;
return `<span class="current-building-effect ${effect.enabled ? "" : "inactive"}" title="${esc(label)}" aria-label="${esc(label)}">${effect.items.map((x) => `<span>${metric(x.icon, x.value)}</span>`).join("")}</span>`;
};
return `<h3>${t("countryside")} <small>${a.estates.filter((x) => (!x.vpArea && x.id !== "quarry") || !a.puertoma).length}/${a.puertoma ? 10 : 12}</small></h3><div class="estates">${a.estates.map((x, i) => `<article class="estate ${x.id}" title="${esc(t(x.id))}">${icon(GOODS.includes(x.id) ? `field-${x.id}` : x.id, 36)}<span class="estate-name">${t(x.id)}</span>${x.id !== "forest" ? peopleSlots(`e${i}`, x, a.puertoma ? (x.vpArea ? 0 : estateCapacity(x.id)) : 1) : ""}</article>`).join("")}${Array.from({ length: Math.max(0, (a.puertoma ? 10 : 12) - a.estates.length) }, () => '<span class="estate empty-estate"></span>').join("")}</div><h3>${t("city")} <small>${a.puertoma ? a.buildings.length : citySize(a)}/${a.puertoma ? 8 : 12}</small></h3><div class="city-grid">${a.buildings.map((x, i) => `<article class="owned-building ${B[x.id].size === 2 ? "expanded" : ""}"><button type="button" data-building="${x.id}" class="building-face" title="${esc(x.id === "monument" ? t(x.id) : t.effect(x.id))}">${buildingPictogram(x.id, 28)}<span class="owned-building-name">${t(x.id)}</span>${effectBadge(i)}</button><div class="owned-building-bottom">${a.puertoma ? `<small>${t("level")} ${x.level}</small>` : peopleSlots(`b${i}`, x, B[x.id].workers)}${pointsBadge(B[x.id].vp)}</div></article>`).join("")}${a.buildings.length ? "" : `<div class="empty-city">${town}<span>${t("emptyCity")}</span></div>`}</div>`;
}