From abdf207e66d901504e94c19d0390c956dd687ca8 Mon Sep 17 00:00:00 2001 From: hided62 Date: Mon, 24 Aug 2026 19:48:47 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9E=A5=EC=88=98=20=EB=AA=85=EB=A0=B9?= =?UTF-8?q?=EC=9D=98=20Ref=20=EB=A1=9C=EA=B7=B8=20=ED=98=95=EC=8B=9D?= =?UTF-8?q?=EC=9D=84=20=EB=B3=B5=EC=9B=90=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/game-engine/src/turn/reservedTurnHandler.ts | 4 +++- .../test/generalTurnLegacyCompatibility.test.ts | 8 +++++++- packages/logic/src/actions/turn/general/che_장비매매.ts | 1 + packages/logic/test/itemActionEvents.test.ts | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/game-engine/src/turn/reservedTurnHandler.ts b/app/game-engine/src/turn/reservedTurnHandler.ts index c787e0c4..0c6f1a42 100644 --- a/app/game-engine/src/turn/reservedTurnHandler.ts +++ b/app/game-engine/src/turn/reservedTurnHandler.ts @@ -1858,7 +1858,9 @@ export const createReservedTurnHandler = async (options: { currentGeneral.crew = 0; currentGeneral.rice = 0; logs.push( - createGeneralActionLog(currentGeneral.id, '군량이 모자라 병사들이 소집해제되었습니다!') + createGeneralActionLog(currentGeneral.id, '군량이 모자라 병사들이 소집해제되었습니다!', { + format: LogFormat.PLAIN, + }) ); preTurnContext.skill.activate('pre.소집해제'); } diff --git a/app/game-engine/test/generalTurnLegacyCompatibility.test.ts b/app/game-engine/test/generalTurnLegacyCompatibility.test.ts index 81ff443e..f4355368 100644 --- a/app/game-engine/test/generalTurnLegacyCompatibility.test.ts +++ b/app/game-engine/test/generalTurnLegacyCompatibility.test.ts @@ -1,5 +1,6 @@ import { describe, expect, it } from 'vitest'; import { ConstantRNG, RandUtil } from '@sammo-ts/common'; +import { LogFormat } from '@sammo-ts/logic'; import type { TurnSchedule } from '@sammo-ts/logic/turn/calendar.js'; import type { TurnGeneral, TurnWorldSnapshot, TurnWorldState } from '../src/turn/types.js'; import { createTurnTestHarness } from './helpers/turnTestHarness.js'; @@ -358,7 +359,12 @@ describe('legacy general-turn execution contract', () => { expect(updated.crew).toBe(0); expect(updated.rice).toBe(0); expect(harness.world.getCityById(1)!.population).toBe(10_200); - expect(harness.getCollectedLogs().some((log) => log.text.includes('소집해제'))).toBe(true); + expect(harness.getCollectedLogs()).toContainEqual( + expect.objectContaining({ + text: expect.stringContaining('소집해제'), + format: LogFormat.PLAIN, + }) + ); }); it('persists pre-turn stacking and applies the inherited 60-turn cooldown', async () => { diff --git a/packages/logic/src/actions/turn/general/che_장비매매.ts b/packages/logic/src/actions/turn/general/che_장비매매.ts index 979c09e8..1b596fde 100644 --- a/packages/logic/src/actions/turn/general/che_장비매매.ts +++ b/packages/logic/src/actions/turn/general/che_장비매매.ts @@ -238,6 +238,7 @@ export class ActionDefinition< { scope: LogScope.SYSTEM, category: LogCategory.HISTORY, + format: LogFormat.YEAR_MONTH, } ); } diff --git a/packages/logic/test/itemActionEvents.test.ts b/packages/logic/test/itemActionEvents.test.ts index 4c720c76..b29ac120 100644 --- a/packages/logic/test/itemActionEvents.test.ts +++ b/packages/logic/test/itemActionEvents.test.ts @@ -225,6 +225,10 @@ describe('typed item lifecycle events', () => { format: LogFormat.MONTH, }, ]); + expect(logs.at(-1)).toMatchObject({ + message: expect.stringContaining('【판매】'), + format: LogFormat.YEAR_MONTH, + }); expect(outcome.effects).toContainEqual( expect.objectContaining({ type: 'general:patch',