Vacuum: pick up what you click, blow out what's in hand (t20)
A drag takes only the material it starts on (Shift: everything). The blow selection is the hand: click or Q/E for one material, Ctrl+click for a mix. Empty materials leave the hand, an empty hand blows nothing, and a pickup fills an empty hand. Removes the pick-up marks and the F vacuum menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -14,9 +14,12 @@ ticks(run, 60);
|
||||
// 2. vacuum with a filter: only rubble
|
||||
rect(run, 100, 96, 104, 99, run('COAL'));
|
||||
ticks(run, 30);
|
||||
const got = run('toolVacuum(120, 104, 6, m => m === RSTONE).got');
|
||||
const pickup = run('toolVacuum(120, 104, 6, m => m === RSTONE)');
|
||||
const got = pickup.got;
|
||||
check('vacuum reports the first material picked up', pickup.m === run('RSTONE'));
|
||||
check('vacuum picks only the filtered material', run('bag[RSTONE]') > 0 && run('bag[COAL]') === 0, `${run('bag[RSTONE]')} rubble, ${run('bag[COAL]')} coal`);
|
||||
run('toolVacuum(102, 98, 4, m => true)');
|
||||
check('empty vacuum reports no first material', run('toolVacuum(10, 10, 1, () => true).m') === 0);
|
||||
check('unfiltered vacuum picks coal', run('bag[COAL]') > 0, run('bag[COAL]'));
|
||||
// 3. drop: grains fall
|
||||
const c0 = run('bag[COAL]');
|
||||
@@ -25,7 +28,7 @@ run('for (let k=0;k<5;k++) { toolBlow(80, 70, 1, COAL); simTick(); }');
|
||||
check('blown coal flies out of the bot', run('flyers.length') > 0, run('flyers.length'));
|
||||
ticks(run, 120);
|
||||
check('blown coal leaves the bag and lands on the ground', run('bag[COAL]') < c0 && run('flyers.length') === 0 && count(run, run('COAL'), 60, 80, 100, 99) > 0, `${c0}->${run('bag[COAL]')} landed ${count(run, run('COAL'), 60, 80, 100, 99)}`);
|
||||
check('empty blow marks explain that nothing is left', run('toolBlow(80, 70, 1, COAL, [CUORE, BARCU]).status') === 'No marked materials left to blow.');
|
||||
check('empty blow mix explains that nothing is in hand', run('toolBlow(80, 70, 1, COAL, [CUORE, BARCU]).status') === 'Nothing in hand: Q/E or click something in the bag.');
|
||||
// bot flies through built walls but not through natural rock
|
||||
run('bag[RSTONE] += 64; bagTotal += 64; placeBlocks(BP_WALL, RSTONE, blockRect(30, 14, 30, 17))');
|
||||
check('bot can overlap a built wall', !run('botOverlapSolid(121, 58)'));
|
||||
|
||||
Reference in New Issue
Block a user