Pollution Heatmap


Multi-color pollution overlay for the map view, scaled to the surface's actual current max chunk pollution instead of the vanilla fixed 150 cap. Toggle on/off with a hotkey; scanning only runs while the overlay is on and you're looking at the map.

Utilities
5 days ago
2.1
91

Changelog

Version: 0.4.1
Date: 2026-08-07
  Changes:
    - Added a thumbnail.png for the mod portal page
Version: 0.4.0
Date: 2026-08-06
  Features:
    - Most "refresh" cycles now only rescan "hot" chunks (last cycle's non-clean chunks plus their
      8 neighbors) instead of every generated chunk, since pollution diffuses gradually rather than
      jumping to a distant chunk. A full scan still runs every 20th cycle to catch pollution
      appearing somewhere entirely new (e.g. a second base) and to refresh the total chunk count.
    - Added a "Print scan debug info to chat" setting (off by default). When enabled, prints each
      cycle's chunk count, hot/full mode, batch size vs. target interval, actual duration, and max
      change to chat - useful for diagnosing performance, not needed for normal use.
  Changes:
    - Default rescan interval lowered from 10 to 3 seconds, now that most cycles are much cheaper
      hot scans rather than always scanning every chunk.
Version: 0.3.0
Date: 2026-08-06
  Features:
    - Added a draggable legend overlay that appears alongside the heatmap while it's enabled and
      you're viewing the map. Shows the current surface max, the color break point (with its
      percentage), and the clean cutoff, plus two gradient bars mirroring the on-map colors:
      the high band (break -> max) above the break label and the low band (clean -> break) below.
      Initial position sits just right of the vanilla left-side panel; drag it anywhere by its
      title bar and the position persists across hide/show.
Version: 0.2.1
Date: 2026-08-05
  Performance:
    - The "refresh" cycle no longer re-walks every chunk on the surface just to count them for batch
      sizing. "priming" already walks every chunk once to seed the max - its chunk count is now
      cached and reused by every refresh cycle instead of being re-derived from scratch each time.
    - The button-visibility poll now runs every 10 ticks instead of every single tick
Version: 0.2.0
Date: 2026-08-05
  Features:
    - Added a "Heatmap" button in the top GUI that appears while looking at the map/chart view,
      letting you toggle the overlay with a click instead of only via the hotkey
  Changes:
    - Removed the "[Pollution Heatmap] ON/OFF/Ready" console print messages; the toggle button's
      pressed state is now the only on/off feedback
Version: 0.1.2
Date: 2026-08-05
  Changes:
    - The pollution scale's max is tracked live again instead of staying frozen for the whole
      viewing session: each refresh cycle already reads every chunk's pollution to color it, so it
      also remembers the highest value it saw and adopts that as next cycle's max. Keeps 0.1.1's
      single-pass-per-cycle performance and its priming/cache bootstrap, just without the max going
      stale while you watch.
Version: 0.1.1
Date: 2026-08-05
  Bugfixes:
    - Fixed a crash on load ("Detected modifications to the 'storage' table") caused by save
      migration logic running in on_load, which is not allowed to modify storage
  Changes:
    - The pollution scale's max is now measured once when the overlay is turned on (or when you
      switch viewed surface), instead of being rescanned every interval. Toggle the overlay off
      and back on to re-measure it against the current worst chunk.
  Performance:
    - Halved get_pollution() calls per scan cycle by caching pollution while scanning instead of
      re-reading it during coloring
    - Settings and gradient math are now computed once per cycle instead of every tick/chunk
    - Rect lookups use numeric chunk keys instead of string concatenation
    - Rects only reassign their viewer list when it actually changes
    - The view-tracking poll (on_nth_tick) no longer runs at all while no player has the overlay
      enabled
Version: 0.1.0
Date: 2026-08-05
  Features:
    - Initial release
    - Multi-color pollution overlay for the map view, scaled to the surface's actual current max
      chunk pollution instead of the vanilla fixed 150 cap
    - Toggle overlay on/off with a hotkey (unbound by default, bind it in Settings > Controls > Mods)
    - Overlay only scans while enabled and looking at the map for that surface