fix(node-groups): 슬롯 좌표 단언을 MAX_MONSTERS 기준으로 (fail-fast)

This commit is contained in:
2026-06-10 21:52:10 +09:00
parent 903a06d233
commit 6eea4f9e17

View File

@@ -312,8 +312,8 @@ function entity({ id, path, modelId, entryId, componentNames, components, displa
function upsertUi() {
for (const g of ['combat', 'elite', 'boss']) {
if (!Array.isArray(SLOTS[g]) || SLOTS[g].length < 1) {
throw new Error(`[gen-slaydeck] monster-slots.json "${g}" 그룹 좌표가 없습니다`);
if (!Array.isArray(SLOTS[g]) || SLOTS[g].length < MAX_MONSTERS) {
throw new Error(`[gen-slaydeck] monster-slots.json "${g}" 그룹 좌표(${SLOTS[g] ? SLOTS[g].length : 0}) < MAX_MONSTERS(${MAX_MONSTERS})`);
}
}
const ui = JSON.parse(readFileSync(UI_FILE, 'utf8'));