feat(engine): migrate monthly nation statistics

This commit is contained in:
2026-07-25 21:57:10 +00:00
parent 6adb5aa52b
commit 3aa0163755
7 changed files with 765 additions and 27 deletions
+19 -16
View File
@@ -282,22 +282,25 @@ const mapCityRow = (row: TurnEngineCityRow): City => {
};
};
const mapNationRow = (row: TurnEngineNationRow): Nation => ({
id: row.id,
name: row.name,
color: row.color,
capitalCityId: row.capitalCityId,
chiefGeneralId: row.chiefGeneralId,
gold: row.gold,
rice: row.rice,
power: 0,
level: row.level,
typeCode: row.typeCode,
meta: {
...asTriggerRecord(row.meta),
tech: row.tech,
},
});
const mapNationRow = (row: TurnEngineNationRow): Nation => {
const meta = asTriggerRecord(row.meta);
return {
id: row.id,
name: row.name,
color: row.color,
capitalCityId: row.capitalCityId,
chiefGeneralId: row.chiefGeneralId,
gold: row.gold,
rice: row.rice,
power: readMetaNumber(meta, 'power') ?? 0,
level: row.level,
typeCode: row.typeCode,
meta: {
...meta,
tech: row.tech,
},
};
};
const mapDiplomacyRow = (row: TurnEngineDiplomacyRow): TurnDiplomacy => {
const { meta, dead } = readDiplomacyMeta(asRecord(row.meta));