Bag: rock goes in as rubble, older saves convert, list shows everything held
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -148,4 +148,13 @@ const screwCatch = run(`(() => {
|
||||
return {airborne, caught, bag: bag[SAND]};
|
||||
})()`);
|
||||
check('vacuum held under a screw arc catches its launched sand', screwCatch.airborne === 16 && screwCatch.caught === 16 && screwCatch.bag === 16, JSON.stringify(screwCatch));
|
||||
// Rock in the bag: solids go in as what drilling them gives, and older saves holding solids load
|
||||
// that way too, so the bag never holds something its list can't show.
|
||||
flatWorld(run, 120, 80, 60);
|
||||
check('putting rock in the bag stores its rubble', run('(() => { bag.fill(0); bagTotal = 0; bagAdd(BASALT, 10, true); bagAdd(CLAY, 5, true); return bag[BASALT] === 0 && bag[RBAS] === 10 && bag[CLAY] === 0 && bag[LCLAY] === 5 && bagTotal === 15; })()'));
|
||||
check('a save holding solid rock loads it as rubble with the same total', run(`(() => {
|
||||
bag.fill(0); bagTotal = 0; const s = serializeWorld(); s.meta.bag[BASALT] = 1000; s.meta.bag[CLAY] = 200; s.meta.bag[MSLAG] = 7;
|
||||
deserializeWorld(s.meta, s.buffers);
|
||||
return bag[BASALT] === 0 && bag[RBAS] === 1000 && bag[CLAY] === 0 && bag[LCLAY] === 200 && bag[MSLAG] === 7 && bagTotal === 1207;
|
||||
})()`));
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user