Sloped belts hold their load with moving cleats (t42); sloped filters are downhill shaking screens (t43)
The magic grip is gone: cleats every 8 face cells, 6 grains tall, carry pockets uphill (about 71 grains/s against 90 flat) and overflow rolls back. Sloped filters always run downhill; grains travel by gravity and a shake, and sorting stays exact. Drawing needs another pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+9
-14
@@ -19,11 +19,11 @@ function conveyorStep(x, y, d) {
|
||||
const b = (y >> 2) * BW + (x >> 2);
|
||||
return beltGrade(blockP[b]) * d;
|
||||
}
|
||||
function carryColumn(a, d, pass) {
|
||||
function carryColumn(a, d, pass, depth = CARRY_DEPTH) {
|
||||
if (a < 0 || mat[a] === EMPTY) return;
|
||||
const sy = ((a / W) | 0) + 1, step = conveyorStep(a % W, sy, d);
|
||||
let blocked = false;
|
||||
for (let L = 0; L < CARRY_DEPTH; L++, a -= W) {
|
||||
for (let L = 0; L < depth; L++, a -= W) {
|
||||
if (a < 0) return;
|
||||
const m = mat[a];
|
||||
if (m === EMPTY || (PH[m] === PH_SOLID && !part[a])) return; // the top of the heap, or a ceiling
|
||||
@@ -53,14 +53,6 @@ function carryColumn(a, d, pass) {
|
||||
stats.moved++;
|
||||
}
|
||||
}
|
||||
// The running face grips its whole supported load, including on the ticks between steps.
|
||||
function holdSlopeColumn(a, pass) {
|
||||
for (let depth = 0; depth < CARRY_DEPTH && a >= 0; depth++, a -= W) {
|
||||
const m = mat[a];
|
||||
if (m === EMPTY || (PH[m] === PH_SOLID && !part[a])) return;
|
||||
if (PH[m] === PH_POWDER && !occ[a] && !(pass && pass[m])) stamp[a] = tickStamp;
|
||||
}
|
||||
}
|
||||
// Belts are perforated: liquid resting on one drips through to whatever open space is under it.
|
||||
function beltDrain(b) {
|
||||
const a = b - W, x = b % W;
|
||||
@@ -93,8 +85,8 @@ function filterCarry(b, d, carrying = true) {
|
||||
for (let k = 0; k < BS; k++) {
|
||||
const x = d > 0 ? bx * BS + BS - 1 - k : bx * BS + k, top = beltFaceY(code, bx, by, x) * W + x;
|
||||
if (part[top] === P_FILTER) {
|
||||
if (carrying) carryColumn(top - W, d, pass);
|
||||
if (isSlopeBelt(code)) holdSlopeColumn(top - W, pass);
|
||||
if (isSlopeBelt(code)) screenNudge(top, d, pass);
|
||||
else if (carrying) carryColumn(top - W, d, pass);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,9 +106,12 @@ function carryBeltsAndFilters(belts, filters, d, bm, carrying) {
|
||||
if (above === BELTL || above === BELTR || netSat(b) <= 0) continue;
|
||||
if (carrying) {
|
||||
if (PH[above] === PH_LIQUID) beltDrain(b);
|
||||
carryColumn(b - W, d, null);
|
||||
if (isSlopeBelt(code)) {
|
||||
cleatCarrying = true;
|
||||
carryColumn(b - W, d, null, pocketDepth(x, (y >> 2) * BW + (x >> 2)));
|
||||
cleatCarrying = false;
|
||||
} else carryColumn(b - W, d, null);
|
||||
}
|
||||
if (isSlopeBelt(code)) holdSlopeColumn(b - W, null);
|
||||
}
|
||||
}
|
||||
// Change what a filter does; grains inside it that no longer pass are pushed out on top.
|
||||
|
||||
Reference in New Issue
Block a user