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:
2026-10-24 13:34:44 -04:00
co-authored by Claude Opus 5.5
parent 14194cb4be
commit c1a085ebb1
17 changed files with 129 additions and 186 deletions
-6
View File
@@ -25,16 +25,10 @@ function grainAt(ax, ay) {
function selectTool(k) {
if (k === GAME.tool) return;
GAME.tool = k; GAME.drag = null; hudDirty = true; renderHotbar(); playSfx('ui');
if (toolId() === 'vacuum') ensureBlow();
}
function bagMaterials() { return BAG_ORDER.filter(m => bag[m] > 0); }
function blowList() { return [...GAME.blow]; }
// Shift + right click: an even mix of everything loose in the bag (bars never mix)
function blowAllList() { return bagMaterials().filter(m => PH[m] !== PH_ITEM && (PH[m] !== PH_LIQUID || player.flask)); }
function blowingAll() { return toolId() === 'vacuum' && (GAME.rmb ? !GAME.rmbConsumed && GAME.blowAll : modShift()); }
// Empty materials stay chosen until the player changes the marks.
function ensureBlow() {
if (GAME.blow.size) return;
const l = bagMaterials(); if (l.length) GAME.blow.add(l[0]);
}
function piece() { return PIECES[GAME.pieceIdx]; }