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>
22 lines
1.2 KiB
JavaScript
22 lines
1.2 KiB
JavaScript
// Loaded sidewall conveyor and screen. Use --js 'slopeScene(false)' (belt) or 'slopeScene(true)' (screen).
|
|
globalThis.slopeScene = function(screen = false) {
|
|
const bx = Math.floor((SX - 100) / BS), by = Math.floor((SY + 12) / BS);
|
|
const left = (bx - 12) * BS, right = (bx + 24) * BS;
|
|
for(let y=by*BS-64;y<by*BS+64;y++)for(let x=left;x<right;x++) {
|
|
const i=y*W+x;bgm[i]=0;setCell(i,y>=by*BS+56?STONE:EMPTY,20,0);
|
|
}
|
|
for(let x=left;x<right;x++){surfY[x]=by*BS+56;dirtY[x]=by*BS+64;}
|
|
money=1e6;weather.next=1e15;
|
|
const startY=screen?by-8:by, grade=screen?1:-1;
|
|
for(let k=0;k<8;k++)placeBlock(screen?BP_FILTER_DOWN:BP_BELT_UP,screen?128:1,bx+k,startY+grade*k,true,{m:[SAND],inv:0});
|
|
const inlet=startY+(screen?0:1),outlet=startY+grade*7+(screen?1:0);
|
|
for(let k=1;k<=5;k++)placeBlock(BP_BELT,1,bx-k,inlet,true);
|
|
for(let k=8;k<13;k++)placeBlock(BP_BELT,1,bx+k,outlet,true);
|
|
for(let t=0;t<300;t++) {
|
|
for(let h=1;h<=4;h++){const i=(inlet*BS-h)*W+(bx-4)*BS;if(mat[i]===EMPTY)setCell(i,screen && (t&2)?GRAVEL:SAND,20,0);}
|
|
simTick();
|
|
}
|
|
// Keep loose rejects and passing grains visible underneath the screen.
|
|
CAM=[(bx+3)*BS,(startY+grade*4)*BS+4];updateRoof();
|
|
}
|