fix: 선택 불가 국가 성향을 입력 목록에서 제외

Ref의 availableNationType 13개를 공용 목록으로 정의하고 건국, NPC/AI 건국, 전투 시뮬레이터 입력과 검증에 적용한다.
This commit is contained in:
2026-08-17 10:39:36 +00:00
parent bc356c0c84
commit 0b8add7f13
12 changed files with 171 additions and 25 deletions
@@ -19,6 +19,17 @@ export const NATION_TRAIT_KEYS = [
export type NationTraitKey = (typeof NATION_TRAIT_KEYS)[number];
// Ref GameConst::$availableNationType excludes the neutral storage/default trait.
// Founding, NPC founding, and the battle simulator must only expose this list.
export type AvailableNationTraitKey = Exclude<NationTraitKey, 'che_중립'>;
export const AVAILABLE_NATION_TRAIT_KEYS: readonly AvailableNationTraitKey[] = NATION_TRAIT_KEYS.filter(
(key): key is Exclude<NationTraitKey, 'che_중립'> => key !== 'che_중립'
);
export const isAvailableNationTraitKey = (value: string): value is AvailableNationTraitKey =>
AVAILABLE_NATION_TRAIT_KEYS.includes(value as AvailableNationTraitKey);
export type NationTraitModule = TraitModule;
export type NationTraitImporter = () => Promise<TraitModuleExport>;