feat: update typecheck script for incremental compilation and add JosaUtil for Korean postposition handling

This commit is contained in:
2025-12-29 12:50:45 +00:00
parent cd43445e4b
commit 30de11797b
5 changed files with 143 additions and 5 deletions
@@ -27,6 +27,7 @@ import type {
} from '../../engine.js';
import { createGeneralPatchEffect, createLogEffect } from '../../engine.js';
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
import { JosaUtil } from '@sammo-ts/common';
export interface AssignmentArgs {
destGeneralId: number;
@@ -103,6 +104,8 @@ export class ActionResolver<
const cityName = this.env.formatCityName
? this.env.formatCityName(destCity)
: destCity.name;
const cityJosa = JosaUtil.pick(cityName, '로');
const generalJosa = JosaUtil.pick(destGeneral.name, '을');
const yearMonth = resolveLastAssignment(context);
const effects: Array<GeneralActionEffect<TriggerState>> = [
@@ -117,7 +120,7 @@ export class ActionResolver<
effects.push(
createLogEffect(
`<Y>${context.general.name}</>에 의해 <G><b>${cityName}</b></> 발령됐습니다.`,
`<Y>${context.general.name}</>에 의해 <G><b>${cityName}</b></>${cityJosa} 발령됐습니다.`,
{
scope: LogScope.GENERAL,
category: LogCategory.ACTION,
@@ -128,7 +131,7 @@ export class ActionResolver<
);
effects.push(
createLogEffect(
`<Y>${destGeneral.name}</> <G><b>${cityName}</b></> 발령했습니다.`,
`<Y>${destGeneral.name}</>${generalJosa} <G><b>${cityName}</b></>${cityJosa} 발령했습니다.`,
{
scope: LogScope.GENERAL,
category: LogCategory.ACTION,
@@ -32,6 +32,7 @@ import {
createNationPatchEffect,
} from '../../engine.js';
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
import { JosaUtil } from '@sammo-ts/common';
export interface AwardArgs {
isGold: boolean;
@@ -148,9 +149,10 @@ export class ActionResolver<
} as Partial<Nation>, nation.id),
];
const amountJosa = JosaUtil.pick(amountText, '을');
effects.push(
createLogEffect(
`${label} ${amountText} 포상으로 받았습니다.`,
`${label} ${amountText}${amountJosa} 포상으로 받았습니다.`,
{
scope: LogScope.GENERAL,
category: LogCategory.ACTION,
@@ -161,7 +163,7 @@ export class ActionResolver<
);
effects.push(
createLogEffect(
`<Y>${context.destGeneral.name}</>에게 ${label} ${amountText} 수여했습니다.`,
`<Y>${context.destGeneral.name}</>에게 ${label} ${amountText}${amountJosa} 수여했습니다.`,
{
scope: LogScope.GENERAL,
category: LogCategory.ACTION,