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:
+4
-4
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user