Bar rack blocks: store 50 bars each, F lets them out oldest first (t1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -92,6 +92,18 @@ function hoverInfo(ax, ay) {
|
||||
if (mm.type === 'wheel' || mm.type === 'engine') t2.push(`making ${mm.out.toFixed(1)} power`);
|
||||
if (mm.type === 'fan') { t2.push(mm.on ? 'on' : 'off · press F'); if (mm.hot > 760) { t2.push(`${mm.hot}°C · melts at 1085°C`); warn = 'too hot'; } }
|
||||
if (mm.type === 'silo') t2.push(mm.sn ? `holds ${mm.sn.toLocaleString('en-US')} / ${SILO_CAP.toLocaleString('en-US')} ${MD[mm.sm].name.toLowerCase()}` : `empty (holds ${SILO_CAP.toLocaleString('en-US')} grains of one material)`, mm.open ? 'gate open · F shuts it' : 'gate shut · F opens it');
|
||||
} else if (b === BP_RACK) {
|
||||
const top = rackTop((ay >> 2) * BW + (ax >> 2)), counts = new Map();
|
||||
let n = 0, capacity = 0;
|
||||
for (let q = top; q < NB && blockP[q] === BP_RACK; q += BW) {
|
||||
const s = rackState.get(q); capacity += RACK_CAP; n += s.n;
|
||||
for (const [m, count] of s.q) counts.set(m, (counts.get(m) || 0) + count);
|
||||
}
|
||||
t1 = 'Bar rack'; t2.push(`${n} / ${capacity} bars`);
|
||||
t2.push(...[...counts].slice(0, 4).map(([m, count]) => `${count} ${MD[m].name.toLowerCase()}`));
|
||||
if (counts.size > 4) t2.push('+ more');
|
||||
t2.push(rackState.get(top).open ? 'open: letting bars out' : 'closed: F lets bars out');
|
||||
if (n === capacity) t2.push('full');
|
||||
} else if (isProcCode(b)) {
|
||||
const s = procState.get((ay >> 2) * BW + (ax >> 2)), saw = b === BP_SAW, press = b === BP_PRESS;
|
||||
t1 = press ? 'Brick press' : saw ? 'Saw' : 'Grinder';
|
||||
|
||||
Reference in New Issue
Block a user