fix(node-groups): 슬롯 좌표 단언을 MAX_MONSTERS 기준으로 (fail-fast)
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user