fix market capacity
This commit is contained in:
@@ -166,11 +166,20 @@ window.renderTownDetails = function() {
|
||||
`;
|
||||
|
||||
const mCap = resObj.market_capacity || 0;
|
||||
const aCap = resObj.available_trade_capacity != null ? resObj.available_trade_capacity : mCap;
|
||||
|
||||
document.getElementById('td-market').innerHTML = mCap > 0
|
||||
? `📦 Εμπορική Χωρητικότητα: <strong>${window.fmt(mCap)}</strong>`
|
||||
? `📦 Εμπορική Χωρητικότητα: <strong style="color:#6fcfcf">${window.fmt(aCap)}</strong> / <strong>${window.fmt(mCap)}</strong>`
|
||||
: '';
|
||||
|
||||
const mCapLabel = document.getElementById('market-capacity-label');
|
||||
if (mCapLabel) mCapLabel.textContent = `Χωρητικότητα: ${window.fmt(mCap)}`;
|
||||
if (mCapLabel) {
|
||||
if (mCap > 0) {
|
||||
mCapLabel.innerHTML = `Χωρητικότητα: <strong style="color:#6fcfcf">${window.fmt(aCap)}</strong> / ${window.fmt(mCap)}`;
|
||||
} else {
|
||||
mCapLabel.textContent = '';
|
||||
}
|
||||
}
|
||||
|
||||
const godName = t.god ? t.god.charAt(0).toUpperCase() + t.god.slice(1) : 'Κανένας';
|
||||
const seaStr = t.sea != null ? `Θ${t.sea}` : '—';
|
||||
|
||||
Reference in New Issue
Block a user