Vacuum menu on F replaces the pick-up modes (t16)

Pick-up takes everything unless something is marked; F with the Vacuum
(when nothing in reach can be used) or the card chips open a menu with
pick-up and blow toggles per material. The bag rows lose their buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 02:28:56 -04:00
co-authored by Claude Opus 5.5
parent 255824ec6d
commit aa46406c92
16 changed files with 148 additions and 125 deletions
+2 -2
View File
@@ -153,9 +153,9 @@ function drawPreviews() {
if (t === 'vacuum') {
// what the right button would blow, next to the cursor; what the left is sucking, while it sucks
const sz = Math.max(6, zp * 1.6), qx = p.x + (r + 1.2) * zp, qy = p.y - (r + 1.2) * zp;
const swatches = GAME.lmb && GAME.pickMode === 'first' && GAME.vacFilter > 0 ? [GAME.vacFilter] : GAME.lmb && GAME.pickMode === 'marked' && GAME.vacFilter >= 0 ? [...GAME.collect] : blowList();
const swatches = GAME.lmb ? GAME.vacFilter >= 0 && GAME.collect.size ? [...GAME.collect] : [] : blowList();
swatches.slice(0, 4).forEach((m, k) => { ctx.fillStyle = rgbOf(m); ctx.fillRect(qx + k * (sz + 2), qy, sz, sz); });
if (blowing || (GAME.lmb && GAME.vacFilter)) {
if (blowing || GAME.lmb) {
// faint line from the nozzle: the path the grains take
const c = worldToScreenPx(bot.x + bot.w / 2, bot.y + bot.h / 2);
ctx.strokeStyle = blowing ? 'rgba(255,210,122,0.22)' : 'rgba(92,186,166,0.22)'; ctx.lineWidth = Math.max(1, zp * (r + 0.5) * 0.6);