Sticky materials slide freely on built surfaces (t61)
Stickiness gated every diagonal step, so clay lumps, snow, wood chunks, ash and dirt crawled down sloped walls (a clay grain never got down a 20-piece slope). It now applies only grain against grain: a grain resting on anything built always tries its diagonal step, so chutes carry every material while heaps keep their shape. The random draw is unchanged, so generated worlds stay the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,4 +114,9 @@ globalThis.legacySlopeSave = legacy;
|
||||
run('deserializeWorld(legacySlopeSave.meta,legacySlopeSave.buffers)');
|
||||
check('old save loads all four slope corners unchanged',run('Array.from({length:4},(_,k)=>{const b=6*BW+2+k*3;return blockP[b]===15+k && blockV[b]===RSTONE && blockIntegrity(b)===10 && PIECE_BY_CODE[blockP[b]].id===\'wall\';}).every(Boolean)'));
|
||||
delete globalThis.legacySlopeSave;
|
||||
// Stickiness is grain against grain: on a built slope sticky clay lumps run as fast as sand.
|
||||
const slide=m=>{flatWorld(run,256,224,208);run('for(let k=0;k<20;k++)placeBlock(BP_SLOPE_BL,RSTONE,10+k,10+k,true);');
|
||||
return run(`(()=>{setCell(39*W+42,${m},20,0);for(let t=0;t<2000;t++){simTick();for(let i=0;i<N;i++)if(mat[i]===${m}&&i%W>=118)return t;}return -1;})()`);};
|
||||
const sandT=slide('SAND'),clayT=slide('LCLAY');
|
||||
check('clay lumps slide down a built slope as fast as sand',clayT>0 && clayT<=sandT+4,JSON.stringify([sandT,clayT]));
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user