Screw conveyors join across the corner to diagonals (t62)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 12:12:44 -04:00
co-authored by Claude Opus 5.5
parent 828c71487c
commit ff9fd7b1b8
13 changed files with 250 additions and 99 deletions
+7
View File
@@ -90,6 +90,13 @@ function entScrewTick(e, p) {
if ((tick & 1) || netSat(ci) <= 0 || rnd() > netSat(ci)) return;
const dx = SCREW_DX[p], dy = SCREW_DY[p];
if (dx && dy) { entDiagonalScrewTick(e, p); return; }
const edge = entScrewEdge(e, dx, dy, 0), behind = edge - dx - dy * W;
const corner = edge >= 0 ? straightScrewNext(behind, p) : -1;
if (corner >= 0 && corner !== edge) {
const x = (corner % W) & ~3, y = entScrewLane((corner / W) | 0, e.iy);
if (entScrewMove(e, x, y, true)) stats.moved++;
return;
}
let x = e.ix + dx, y = e.iy + dy, next = 0, ax = 0, ay = 0;
for (let k = 0; k < (dx ? BAR_H : BAR_W); k++) {
const i = entScrewEdge(e, dx, dy, k);