fix: match scenario 2601 monthly seed progression

This commit is contained in:
2026-08-03 18:56:23 +00:00
parent 2f17584075
commit 58b9a230a7
92 changed files with 3696 additions and 587 deletions
+8 -6
View File
@@ -474,9 +474,11 @@ const buildNationUpdate = (
color: nation.color,
capitalCityId: nation.capitalCityId,
chiefGeneralId: nation.chiefGeneralId,
gold: nation.gold,
rice: nation.rice,
tech: typeof nation.meta.tech === 'number' && Number.isFinite(nation.meta.tech) ? Math.trunc(nation.meta.tech) : 0,
gold: toLegacyDatabaseInt(nation.gold),
rice: toLegacyDatabaseInt(nation.rice),
// Ref persists nation.tech as FLOAT. Domestic research commonly produces
// tenths, and truncating here changes the following month's state/power.
tech: typeof nation.meta.tech === 'number' && Number.isFinite(nation.meta.tech) ? nation.meta.tech : 0,
level: nation.level,
typeCode: nation.typeCode,
meta: asJson({
@@ -755,11 +757,11 @@ export const createDatabaseTurnHooks = async (
color: nation.color,
capitalCityId: nation.capitalCityId,
chiefGeneralId: nation.chiefGeneralId,
gold: nation.gold,
rice: nation.rice,
gold: toLegacyDatabaseInt(nation.gold),
rice: toLegacyDatabaseInt(nation.rice),
tech:
typeof nation.meta.tech === 'number' && Number.isFinite(nation.meta.tech)
? Math.trunc(nation.meta.tech)
? nation.meta.tech
: 0,
level: nation.level,
typeCode: nation.typeCode,