merge: 최신 main을 토너먼트 즉시 조편성 수정에 통합
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import { isAvailableNationTraitKey } from '@sammo-ts/logic';
|
||||
|
||||
import type { BattleSimRequestPayload } from './types.js';
|
||||
|
||||
const zBattleSimGeneral = z.object({
|
||||
@@ -71,7 +73,7 @@ const zBattleSimCity = z.object({
|
||||
});
|
||||
|
||||
const zBattleSimNation = z.object({
|
||||
type: z.string().min(1),
|
||||
type: z.string().refine(isAvailableNationTraitKey),
|
||||
tech: z.number().min(0),
|
||||
level: z.number().int().min(0),
|
||||
capital: z.number().int().min(0),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
AVAILABLE_NATION_TRAIT_KEYS,
|
||||
ITEM_KEYS,
|
||||
EVENT_DOMESTIC_TRAIT_KEYS,
|
||||
loadEventDomesticTraitModules,
|
||||
@@ -6,7 +7,6 @@ import {
|
||||
loadNationTraitModules,
|
||||
loadPersonalityTraitModules,
|
||||
loadWarTraitModules,
|
||||
NATION_TRAIT_KEYS,
|
||||
PERSONALITY_TRAIT_KEYS,
|
||||
WAR_TRAIT_KEYS,
|
||||
type ItemModule,
|
||||
@@ -110,7 +110,7 @@ export const loadBattleSimTraitOptions = async (): Promise<{
|
||||
}> => {
|
||||
if (!cachedTraitOptions) {
|
||||
cachedTraitOptions = Promise.all([
|
||||
loadNationTraitModules([...NATION_TRAIT_KEYS]),
|
||||
loadNationTraitModules([...AVAILABLE_NATION_TRAIT_KEYS]),
|
||||
loadEventDomesticTraitModules([...EVENT_DOMESTIC_TRAIT_KEYS]),
|
||||
loadWarTraitModules([...WAR_TRAIT_KEYS]),
|
||||
loadPersonalityTraitModules([...PERSONALITY_TRAIT_KEYS]),
|
||||
|
||||
Reference in New Issue
Block a user