greekbuilding names ,live synch button ,market capacity

This commit is contained in:
2026-04-22 20:48:34 +03:00
parent ec2b0c631e
commit c1cc8ceb7a
7 changed files with 92 additions and 5 deletions

View File

@@ -144,8 +144,10 @@ window.renderBuildQueuePreview = function() {
el.innerHTML = '<span style="color:#444">Build queue: empty</span>';
return;
}
const items = town.build_queue.map(o =>
`<span>${o.building_type || o.name || JSON.stringify(o)}</span>`
).join('');
const items = town.build_queue.map(o => {
const raw = o.building_type || o.name || "";
const nameGr = window.BUILDING_NAMES_GR[raw] || raw || JSON.stringify(o);
return `<span style="background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; margin-right: 4px; font-size: 0.8rem;">${nameGr}</span>`;
}).join('');
el.innerHTML = `<div style="margin-top:6px;color:#888;font-size:0.72rem;text-transform:uppercase;letter-spacing:0.5px;margin-bottom:4px;">Current queue</div>${items}`;
};

View File

@@ -160,6 +160,11 @@ window.renderTownDetails = function() {
<div>${window.RES_ICONS.iron} Ασήμι: ${resHtml(resObj.iron || 0, reservedIron)}</div>
<div style="margin-top: 6px;">${window.RES_ICONS.pop} Πληθυσμός: <strong style="color:#fff">${resObj.population || 0}</strong></div>
`;
const mCap = resObj.market_capacity || 0;
document.getElementById('td-market').innerHTML = `
📦 Εμπορική Χωρητικότητα: <strong>${window.fmt(mCap)}</strong>
`;
const godName = t.god ? t.god.charAt(0).toUpperCase() + t.god.slice(1) : 'Κανένας';
const seaStr = t.sea != null ? `Θ${t.sea}` : '—';