Vacuum: Shift blows everything, Ctrl+click in the bag, one-line menu rows (t16)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 02:52:56 -04:00
co-authored by Claude Opus 5.5
parent aa46406c92
commit 209d065f4e
11 changed files with 73 additions and 29 deletions
+4 -4
View File
@@ -188,9 +188,9 @@ function primaryRelease(shift) {
}
if (t === 'vacuum') { GAME.vacFilter = 0; hudDirty = true; }
}
function secondaryPress() {
function secondaryPress(shift) {
const t = toolId();
GAME.rmbSeen = new Set();
GAME.rmbSeen = new Set(); GAME.blowAll = !!shift;
if (GAME.selDrag) { GAME.selDrag = null; hudDirty = true; GAME.rmbConsumed = true; }
else if (GAME.paste) { GAME.paste = false; hudDirty = true; playSfx('ui'); GAME.rmbConsumed = true; }
else if (t === 'build' && GAME.drag) { GAME.drag = null; GAME.dragDir = -1; GAME.rmbConsumed = true; }
@@ -216,8 +216,8 @@ function toolTick() {
if (GAME.rmb && !GAME.rmbConsumed) {
if (t === 'vacuum') {
ensureBlow();
const list = blowList();
const r = toolBlow(ax, ay, GAME.brush[1], list[0] || 0, list.length > 1 ? list : null);
const list = GAME.blowAll ? blowAllList() : blowList();
const r = GAME.blowAll && !list.length ? { placed: 0, status: 'Nothing loose in the bag to blow.' } : toolBlow(ax, ay, GAME.brush[1], list[0] || 0, list.length > 1 ? list : null);
if (r.placed) { playSfx('blow'); hudDirty = true; } else if (r.status) setStatus(r.status);
} else if (t === 'build') {
const key = `${(ax / BS) | 0},${(ay / BS) | 0}`;