Remove conversions for old saves (t83)
This commit is contained in:
+2
-2
@@ -199,9 +199,9 @@ run('clearAllGhosts(); pasteGhost(flipBlueprint(copyRegion(120, 100, 123, 103)),
|
||||
check('pasting it builds a filter with the same materials and mode', run('blockP[25*BW+34]') === run('BP_FILTER') && run('JSON.stringify(filterInfo(25*BW+34))') === JSON.stringify({ m: [run('CUORE'), run('FEORE')].sort((a, b) => a - b), inv: 1 }), run('JSON.stringify(filterInfo(25*BW+34))'));
|
||||
run('globalThis.__s = serializeWorld(); deserializeWorld(__s.meta, __s.buffers);');
|
||||
check('save and load keep filters, their materials, mode and direction', run('blockP[25*BW+30]') === run('BP_FILTER') && run('blockV[25*BW+30]') === 128 && run('filterInfo(25*BW+30).inv') === 1 && run('filterInfo(25*BW+30).m.length') === 2 && run('part[100*W+120]') === run('P_FILTER'));
|
||||
// a save from before: one material kept in the block variant
|
||||
// A retired single-material variant is no longer reconstructed on load.
|
||||
run('__s.meta.filters = []; __s.buffers.blockV[25*BW+30] = 128 | SAND; deserializeWorld(__s.meta, __s.buffers);');
|
||||
check('older filters keep the one material they had', run('JSON.stringify(filterInfo(25*BW+30))') === JSON.stringify({ m: [run('SAND')], inv: 0 }) && run('blockV[25*BW+30]') === 128);
|
||||
check('loading does not reconstruct retired single-material filters', run('!filterCfg.has(25*BW+30) && blockV[25*BW+30] === (128 | SAND)'));
|
||||
// the run of matching filters in a row
|
||||
fresh();
|
||||
run('for (let bx = 20; bx < 26; bx++) placeBlock(BP_FILTER, 128, bx, 25, true, { m: [SAND] }); placeBlock(BP_FILTER, 128, 26, 25, true, { m: [COAL] }); placeBlock(BP_FILTER, 0, 27, 25, true, { m: [COAL] });');
|
||||
|
||||
Reference in New Issue
Block a user