Remove conversions for old saves (t83)
This commit is contained in:
@@ -51,6 +51,29 @@ for (const [label, doctor, clean] of [
|
||||
})()`));
|
||||
}
|
||||
|
||||
// Retired save formats are no longer translated into current construction or trees.
|
||||
flatWorld(run, 256, 256, 200);
|
||||
run(`
|
||||
placeBlock(BP_FILTER, 128, 5, 10, true, { m: [SAND, COAL], inv: 1 });
|
||||
placeBlock(BP_PIPE, 0, 8, 10, true);
|
||||
bgm[100 * W + 40] = LEAVES;
|
||||
globalThis.currentSave = serializeWorld();
|
||||
deserializeWorld(currentSave.meta, currentSave.buffers);
|
||||
`);
|
||||
check('current filter settings and direction survive loading', run('blockV[10 * BW + 5] === 128 && JSON.stringify(filterCfg.get(10 * BW + 5)) === JSON.stringify(filterRec({ m: [SAND, COAL], inv: 1 }))'));
|
||||
check('current thin pipes and background trees survive loading', run('part[40 * W + 32] === P_PIPE && mat[40 * W + 32] === EMPTY && bgm[100 * W + 40] === LEAVES'));
|
||||
run(`
|
||||
currentSave.meta.filters = [];
|
||||
currentSave.buffers.blockV[10 * BW + 5] = 128 | SAND;
|
||||
delete currentSave.buffers.bgm;
|
||||
currentSave.buffers.mat[100 * W + 40] = LEAVES;
|
||||
currentSave.buffers.mat[110 * W + 40] = WOOD;
|
||||
currentSave.buffers.flags[110 * W + 40] = F_NAT;
|
||||
deserializeWorld(currentSave.meta, currentSave.buffers);
|
||||
`);
|
||||
check('loading does not invent a filter setting from its old block variant', run('!filterCfg.has(10 * BW + 5) && blockV[10 * BW + 5] === (128 | SAND)'));
|
||||
check('loading does not move foreground trees into a missing background layer', run('mat[100 * W + 40] === LEAVES && mat[110 * W + 40] === WOOD && flags[110 * W + 40] === F_NAT && bgm[100 * W + 40] === EMPTY && bgm[110 * W + 40] === EMPTY'));
|
||||
|
||||
flatWorld(run, 1024, 256, 200);
|
||||
run(`
|
||||
bot.x = 510; bot.y = 170;
|
||||
|
||||
Reference in New Issue
Block a user