Grinders look like a pair of grinding wheels, Saws like a round blade (t4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,39 @@ function drawMachines() {
|
||||
}
|
||||
ctx.restore();
|
||||
}
|
||||
drawProcBlocks();
|
||||
}
|
||||
// Crushing rollers and saw blades sit over the shared steel housings in both looks.
|
||||
function drawProcBlocks() {
|
||||
const ctx = R.ctx;
|
||||
for (const b of procBlocks) {
|
||||
const bx = b % BW, by = (b / BW) | 0;
|
||||
const [sx, sy, sw] = cellRect(bx * BS, by * BS, BS, BS);
|
||||
if (sx > R.canvas.width || sy > R.canvas.height || sx + sw < 0 || sy + sw < 0) continue;
|
||||
if (SET.fog && fogSeen(bx * BS + 2, by * BS + 2) < 64) continue;
|
||||
const saw = blockP[b] === BP_SAW, busy = tick - (procState.get(b)?.busyT ?? -999) < 30;
|
||||
const angle = busy ? tick * (saw ? 0.5 : 0.25) : b * 0.7;
|
||||
const radius = sw * (saw ? 0.38 : 0.22), teeth = saw ? 10 : 6;
|
||||
ctx.save();
|
||||
ctx.lineWidth = Math.max(1, sw * 0.025);
|
||||
for (let wheel = 0; wheel < (saw ? 1 : 2); wheel++) {
|
||||
const cx = sx + sw * (saw ? 0.5 : wheel ? 0.73 : 0.27), cy = sy + sw * 0.5;
|
||||
const a = wheel ? -angle : angle;
|
||||
ctx.fillStyle = saw ? '#b9c0c8' : '#8a8f96'; ctx.strokeStyle = '#444b54';
|
||||
if (sw >= 12) for (let k = 0; k < teeth; k++) {
|
||||
const t = a + k * Math.PI * 2 / teeth, half = (saw ? 0.18 : 0.24);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(cx + Math.cos(t - half) * radius * 0.9, cy + Math.sin(t - half) * radius * 0.9);
|
||||
ctx.lineTo(cx + Math.cos(t) * radius * 1.15, cy + Math.sin(t) * radius * 1.15);
|
||||
ctx.lineTo(cx + Math.cos(t + half) * radius * 0.9, cy + Math.sin(t + half) * radius * 0.9);
|
||||
ctx.closePath(); ctx.fill(); ctx.stroke();
|
||||
}
|
||||
ctx.beginPath(); ctx.arc(cx, cy, radius, 0, Math.PI * 2); ctx.fill(); ctx.stroke();
|
||||
if (saw) { ctx.beginPath(); ctx.arc(cx, cy, radius * 0.65, 0, Math.PI * 2); ctx.stroke(); }
|
||||
ctx.fillStyle = '#292e36'; ctx.beginPath(); ctx.arc(cx, cy, Math.max(1, radius * 0.19), 0, Math.PI * 2); ctx.fill();
|
||||
}
|
||||
ctx.restore();
|
||||
}
|
||||
}
|
||||
// The silo: legs and braces, a cone to a slide gate, a ribbed steel drum with a ladder and a sight
|
||||
// glass that shows how full it is, a roof with the loading hatch. All in grain units from its corner.
|
||||
|
||||
Reference in New Issue
Block a user