Pipe Visualizer 2.1 Support


Unofficial compatibility patch for Pipe Visualizer (by ashier) to support Factorio 2.1. Visualize the layout and contents of pipe networks. Press Y to draw the selected entity's fluid systems. Press Shift + Y to draw all visible fluid systems. Press Alt + Y to automatically visualize systems on mouse-over. Press Control + Y to toggle between color-by-fluid and color-by-system.

Utilities
3 months ago
2.1
966
Fluids

b Overlay: destroy without valid check, and it does not follow to another surface

3 days ago

destroy_overlay (scripts/overlay.lua around lines 236-241) calls self.background.destroy() and self.mapbackground.destroy() without checking valid. The background can already be gone: iterator.clear_all and clear_hovered call renderer.reset(), which clears all of the mod's render objects when no player has an iterator left. Toggling the overlay after that should stop the game (found by reading the code, not reproduced). if self.background and self.background.valid then self.background.destroy() end, and the same for mapbackground, avoids it.

The overlay also stays on the surface where it was created: after a trip on a platform or to another planet only its target changes, so the new surface has no darkening until the overlay is toggled. Recreating the background in update_overlay when self.background.surface ~= self.player.surface fixes that.

New response