@@ -113,9 +113,9 @@ function shardKey(shard: { file: string }) {
|
||||
}
|
||||
|
||||
function validateIndex(index: LevelsDbIndex): void {
|
||||
if (index.total < 100 || index.min < LEVEL_ID_BASE) {
|
||||
if (index.total < 1 || index.min < LEVEL_ID_BASE) {
|
||||
throw new Error(
|
||||
`关卡库索引过旧 (${index.total} 关),请重新 package-for-project`,
|
||||
`关卡库索引无效 (${index.total} 关),请重新 package-for-project`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -133,9 +133,9 @@ function validateIngested(): void {
|
||||
}
|
||||
const total = sortedIds.length;
|
||||
const minId = sortedIds[0] ?? 0;
|
||||
if (total < 100 || minId < LEVEL_ID_BASE) {
|
||||
if (total < 1 || minId < LEVEL_ID_BASE) {
|
||||
throw new Error(
|
||||
`关卡库过旧 (${total} 关),请用主站导出的 levels-database.json;`
|
||||
`关卡库无效 (${total} 关),请用主站导出的 levels-database.json;`
|
||||
+ '运行 bash tools/sync-level-db.sh 后重新 package-for-project',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user