同步关卡属性编辑与Boss小怪置灰提示
This commit is contained in:
+11
-1
@@ -20,7 +20,12 @@
|
||||
};
|
||||
const inventory = model.sourceOrder(bundle), count = inventory.length;
|
||||
if (index.chunkSize !== 50 || count > 20000) throw new Error('项目分块规格不受支持');
|
||||
const byId = new Map(inventory.map(id => [id, { ...model.sourceLevel(bundle, id), displayLevel: id }]));
|
||||
const byId = new Map(inventory.map(id => {
|
||||
const source = { ...model.sourceLevel(bundle, id), displayLevel: id };
|
||||
// 游戏以敌人、难度文件为唯一来源,避免分块中残留另一份过期配置。
|
||||
delete source.levelSettings;
|
||||
return [id, source];
|
||||
}));
|
||||
const chunks = [];
|
||||
for (let first = 1; first <= count; first += index.chunkSize) {
|
||||
const chunkId = String(chunks.length + 1).padStart(3, '0'), last = Math.min(count, first + index.chunkSize - 1);
|
||||
@@ -41,6 +46,11 @@
|
||||
encounters.levels[id] = JSON.parse(JSON.stringify(encounters.levels[template]));
|
||||
templates[id] = data.sourceTemplates[template] ?? template;
|
||||
}
|
||||
for (const id of inventory) {
|
||||
const settings = model.sourceLevel(bundle, id).levelSettings;
|
||||
if (!settings) continue;
|
||||
encounters.levels[id] = settings.encounter; difficulty.levels[id] = settings.difficulty;
|
||||
}
|
||||
difficulty.levelCount = count;
|
||||
scheduleJson(directory + 'MainlineDifficulty.json', difficulty);
|
||||
scheduleJson(directory + 'MainlineEncounterConfig.json', encounters);
|
||||
|
||||
Reference in New Issue
Block a user