Shift-drag draws a line for belts and other transport pieces
Belts, filters, screw conveyors, shafts and pipe pieces never fill a rectangle; a diagonal belt drag stays sloped with Shift held. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -663,6 +663,12 @@ with sync_playwright() as p:
|
||||
drag(lambda: blk(bbx - 10, bby - 8), lambda: blk(bbx - 8, bby - 6), 4, True)
|
||||
nb2 = ev('blockP.reduce((a, v) => a + (v === BP_WALL), 0)')
|
||||
check('Shift-drag fills a 3×3 rectangle', nb2 - nb1 == 9, nb2 - nb1)
|
||||
ev("GAME.pieceIdx = PIECE_BY_ID.belt.index; for (const [m, n] of PIECE_BY_ID.belt.cost) bag[m] += n * 10; hudDirty = true")
|
||||
drag(lambda: blk(bbx + 3, bby - 10), lambda: blk(bbx + 5, bby - 8), 4, True)
|
||||
belts = ev('[blockP.reduce((a, v) => a + isBelt(v), 0), blockP.reduce((a, v) => a + isSlopeBelt(v), 0), ghostBlocks.size]')
|
||||
check('Shift-drag with a belt still lays a sloped line, not a rectangle', belts == [3, 3, 0], f'{belts}, {ev("GAME.status")}')
|
||||
ev('doUndo()'); settle(30)
|
||||
ev("GAME.pieceIdx = PIECE_BY_ID.wall.index; hudDirty = true")
|
||||
r0 = ev('bag[RSTONE]')
|
||||
pg.mouse.move(*blk(bbx + 3, bby - 4)); pg.mouse.down(button='right'); settle(120); pg.mouse.up(button='right'); settle(80)
|
||||
check('right click takes a block back with a refund', ev('bag[RSTONE]') - r0 == 16 and ev('blockP.reduce((a, v) => a + (v === BP_WALL), 0)') == nb2 - 1, ev('bag[RSTONE]') - r0)
|
||||
|
||||
Reference in New Issue
Block a user