Pneumatic nozzle: air streaks while sucking and blowing (t25)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -321,6 +321,28 @@ with sync_playwright() as p:
|
||||
pg.mouse.wheel(0, 100); settle(300)
|
||||
refill('bag.fill(0)')
|
||||
|
||||
# t25: draw both nozzle effects without advancing the simulation RNG.
|
||||
check('nozzle air streak previews draw and preserve the simulation RNG', ev("""(() => {
|
||||
const aim = GAME.aim, filter = GAME.vacFilter, blow = GAME.blow, consumed = GAME.rmbConsumed;
|
||||
const particles = SET.particles, fog = SET.fog, coal = bag[COAL];
|
||||
try {
|
||||
SET.particles = true; SET.fog = false;
|
||||
GAME.aim = { x: Math.floor(bot.x + bot.w / 2 + 16), y: Math.floor(bot.y + bot.h / 2) };
|
||||
GAME.vacFilter = -1; GAME.rmbConsumed = false;
|
||||
bag[COAL] = 10; GAME.blow = new Set([COAL]);
|
||||
const before = RS;
|
||||
for (let i = 0; i < 5; i++) {
|
||||
GAME.lmb = true; GAME.rmb = false; drawPreviews();
|
||||
GAME.lmb = false; GAME.rmb = true; drawPreviews();
|
||||
}
|
||||
return toolId() === 'vacuum' && RS === before;
|
||||
} finally {
|
||||
GAME.lmb = false; GAME.rmb = false;
|
||||
GAME.aim = aim; GAME.vacFilter = filter; GAME.blow = blow; GAME.rmbConsumed = consumed;
|
||||
SET.particles = particles; SET.fog = fog; bag[COAL] = coal;
|
||||
}
|
||||
})()"""))
|
||||
|
||||
# 3. right button blows the selection; exhausted materials stay selected
|
||||
refill('bag[COAL] = 120; bag[RSTONE] = 600; bag[CUORE] = 60; bag[LCLAY] = 200; bag[LWOOD] = 120')
|
||||
ok = select('2', 'GAME.blow.size === 1 && GAME.blow.has(COAL)')
|
||||
|
||||
Reference in New Issue
Block a user