From 19880dbf36d54dda4f1f363f999923f9ce557c2d Mon Sep 17 00:00:00 2001 From: brockdarnold Date: Mon, 15 Jun 2026 04:30:13 +0000 Subject: [PATCH] publish eve_rock_watcher.py --- eve_rock_watcher.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eve_rock_watcher.py b/eve_rock_watcher.py index 8a229d7..00d5fc2 100644 --- a/eve_rock_watcher.py +++ b/eve_rock_watcher.py @@ -268,6 +268,12 @@ def main(): switch_secs = cp.getint("rock", "switch_secs", fallback=45) if sec else 45 cooldown = cp.getint("rock", "cooldown_secs", fallback=60) if sec else 60 status_secs = cp.getint("rock", "status_secs", fallback=90) if sec else 90 + # OCR rock reads are noisy: the Selected-Item quantity jumps as you click around, and + # survey-region detection false-matches the overview's ore names -> invented rocks + + # wrong "~1s, switch now" ETAs. Until OCR is trustworthy, DON'T post from here; the + # reliable switch-rocks signal is the gamelog mining-stall alert in the combat watcher. + # Flip [rock] post_rock=true to re-enable once OCR reads are validated. + post_rock = cp.getboolean("rock", "post_rock", fallback=False) if sec else False if "--test" in sys.argv: import pytesseract @@ -341,7 +347,7 @@ def main(): # the rock you're emptying = the one with the least time left actives.sort(key=lambda x: x[3]) for key, ore, units, tleft in actives: - if tleft <= switch_secs and now - last_alert.get(key, 0) > cooldown: + if post_rock and tleft <= switch_secs and now - last_alert.get(key, 0) > cooldown: last_alert[key] = now others = [(o, u) for (k, o, u) in keyed if k != key] nxt = max(others, key=lambda x: x[1]) if others else None @@ -352,7 +358,7 @@ def main(): w.notify(cp, "Switch rocks", msg, priority="high", tags="pick,gem") print(f"[rock] ALERT {msg}") # periodic live readout of the rock you're on (so you see the countdown) - if actives and not w.bot_muted(cp) and now - last_status >= status_secs: + if post_rock and actives and not w.bot_muted(cp) and now - last_status >= status_secs: key, ore, units, tleft = actives[0] empty_at = int(now + tleft) others = [(o, u) for (k, o, u) in keyed if k != key]