This commit is contained in:
2026-04-22 21:48:49 +03:00
parent a8c7512b67
commit 373bcc7a9c
3 changed files with 9 additions and 7 deletions

View File

@@ -13,9 +13,11 @@ window.renderLog = function(cmds) {
const p = typeof cmd.payload === 'string' ? JSON.parse(cmd.payload) : cmd.payload;
let desc = '';
if (cmd.type === 'build') {
desc = `Build: ${p.building_id}`;
const nameGr = window.BUILDING_NAMES_GR?.[p.building_id] || p.building_id;
desc = `Build: ${nameGr}`;
} else if (cmd.type === 'recruit') {
desc = `Recruit: ${p.amount}x ${p.unit_id}`;
const nameGr = window.UNIT_NAMES_GR?.[p.unit_id] || p.unit_id;
desc = `Recruit: ${p.amount}x ${nameGr}`;
} else if (cmd.type === 'market_offer') {
desc = `Market: ${p.offer} ${p.offer_type}${p.demand} ${p.demand_type}`;
}