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
+12
View File
@@ -20,6 +20,7 @@ import { createGatewayProfileGate } from './gatewayProfileGate.js';
import { composeCalendarHandlers } from './calendarHandlers.js';
import { createIncomeHandler } from './incomeHandler.js';
import { createNationTurnMonthlyHandler } from './nationTurnMonthlyHandler.js';
import { calculateNpcNationFinance } from './npcTaxHandler.js';
import { createMonthlyBoundaryPreHandler } from './monthlyBoundaryPreHandler.js';
import { createMonthlyWanderHandler } from './monthlyWanderHandler.js';
import {
@@ -471,6 +472,10 @@ const createTurnDaemonRuntimeWithLease = async (
onTournamentRollConsumed: (consumed) => {
monthlyTournamentRollConsumed = consumed;
},
// Deterministic/manual runtimes must schedule the tournament from the
// same clock that advances the game world. Production still falls
// back to the system clock.
now: () => new Date(options.clock?.nowMs() ?? Date.now()),
});
const yearbookHandler = createYearbookHandler({
profileName: options.profileName ?? options.profile,
@@ -508,6 +513,13 @@ const createTurnDaemonRuntimeWithLease = async (
getWorld: () => worldRef,
commandProfile,
commandEnv: monthlyCommandEnv,
calculateNpcNationFinance: (financeWorld, nation, currentMonth) =>
calculateNpcNationFinance(financeWorld, nation, currentMonth, {
commandEnv: monthlyCommandEnv,
scenarioConfig: snapshot.scenarioConfig,
unitSet: snapshot.unitSet,
nationTraits: nationTraitMap,
}),
getAdditionalOccupiedUniqueItemKeys: () => occupiedAuctionUniqueItemKeys,
onActionResolved: options.onActionResolved,
})),