Ping: 10 s recharge with a panel chip, natural ore colours with a rim, glints (t75)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 17:12:09 -04:00
co-authored by Claude Opus 5.5
parent a671dcb59a
commit 29eee51e35
4 changed files with 39 additions and 16 deletions
+5 -3
View File
@@ -202,11 +202,13 @@ function secondaryPress(shift) {
}
// Right click with the drill: a resonance ping. The echo is drawn by drawPing (overlays.js).
const PING_RECHARGE = 180;
const PING_RECHARGE = 600;
// Seconds until the ping is ready again (0: ready).
function pingWait() { return GAME.pingTick !== undefined && tick >= GAME.pingTick ? Math.max(0, Math.ceil((PING_RECHARGE - (tick - GAME.pingTick)) / 60)) : 0; }
function firePing() {
if (GAME.ping && tick >= GAME.ping.tick && tick - GAME.ping.tick < PING_RECHARGE) { setStatus('The ping is still ringing; try again in a moment.'); playSfx('error'); return; }
if (pingWait()) { setStatus(`The ping is recharging: ${pingWait()} s.`); playSfx('error'); return; }
const p = resonancePing(bot.x + bot.w / 2, bot.y + bot.h / 2);
GAME.ping = Object.assign(p, { tick, t0: performance.now() });
GAME.ping = Object.assign(p, { t0: performance.now() }); GAME.pingTick = tick;
playSfx('pulse', 2);
const names = p.found.map(m => MD[m].name.toLowerCase());
setStatus(names.length ? `Ping: ${names.slice(0, 3).join(', ')}${names.length > 3 ? ' and more' : ''} nearby.` : `Ping: no veins within ${Math.round(p.r / BS)} blocks.`, 'info');