feat: 프론트 상태 핸들러 추가 및 예약 턴 핸들러와 통합

This commit is contained in:
2026-01-24 11:05:12 +00:00
parent 9c8f901f7b
commit 01f26edbeb
4 changed files with 203 additions and 1 deletions
+6
View File
@@ -19,6 +19,7 @@ import { createGatewayAdminActionConsumer } from './gatewayAdminActions.js';
import { createGatewayProfileGate } from './gatewayProfileGate.js';
import { composeCalendarHandlers } from './calendarHandlers.js';
import { createIncomeHandler } from './incomeHandler.js';
import { createFrontStateHandler } from './frontStateHandler.js';
import { createReservedTurnHandler } from './reservedTurnHandler.js';
import { createReservedTurnStore } from './reservedTurnStore.js';
import { createTurnDaemonCommandHandler } from './worldCommandHandler.js';
@@ -122,6 +123,10 @@ export const createTurnDaemonRuntime = async (options: TurnDaemonRuntimeOptions)
scenarioConfig: snapshot.scenarioConfig,
nationTraits: nationTraitMap,
});
const frontStateHandler = createFrontStateHandler({
getWorld: () => worldRef,
map: snapshot.map ?? null,
});
const tournamentAutoStartHandler = createTournamentAutoStartHandler({
profileName: options.profileName ?? options.profile,
getRedisClient: () => redisConnector?.client,
@@ -131,6 +136,7 @@ export const createTurnDaemonRuntime = async (options: TurnDaemonRuntimeOptions)
const calendarHandler = composeCalendarHandlers(
options.calendarHandler ?? unification?.handler,
incomeHandler,
frontStateHandler,
tournamentAutoStartHandler
);
const worldOptions: InMemoryTurnWorldOptions = {