Screw conveyors join by the shared rule: low ends and verticals join in the corner block (t67 phase 2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 13:30:44 -04:00
co-authored by Claude Opus 5.5
parent 198bea54da
commit fd35bf334f
14 changed files with 358 additions and 209 deletions
+3 -3
View File
@@ -97,7 +97,7 @@ function machinesTick() {
// beat as belts (every other tick), so a block-wide screw carries as much as a block-deep belt
if ((tick & 1) === 0) for (let p = 1; p < IS_SCREW.length; p++) {
if (!IS_SCREW[p]) continue;
const list = screwLists[p], dx = SCREW_DX[p], dy = SCREW_DY[p], dj = dy * W + dx, flat = dy === 0;
const list = screwLists[p], dx = SCREW_DX[p], dy = SCREW_DY[p], flat = dy === 0;
for (let k = 0; k < list.length; k++) {
const i = list[k];
if (part[i] !== p || occ[i]) continue;
@@ -130,14 +130,14 @@ function machinesTick() {
if (shifted) continue;
}
if (x + dx < 0 || x + dx >= W || y + dy < 0 || y + dy >= H) continue;
const dest = dx && dy ? diagonalScrewNext(i, p) : i + dj;
const dest = dx && dy ? diagonalScrewNext(i, p) : straightScrewNext(i, p);
if (dest < 0) continue;
const nx = dest % W, ny = (dest / W) | 0;
if (nx < 0 || ny < 0 || nx >= W || ny >= H) continue;
const j = dest;
if (occ[j]) continue;
const pj = part[j], screw = IS_SCREW[pj];
if (screw && SCREW_DX[pj] === -dx && SCREW_DY[pj] === -dy) continue;
if (screw && !screwAccepts(pj, dx, dy)) continue;
const t = mat[j];
if (!roomFor(j)) continue;
if (pj === P_GRATE || pj === P_INTAKE || (pj === P_FILTER && !filterPassAt(m, j))) continue;