Orphan Finder

by GotLag

Adds a hotkey to highlight unconnected undergound pipes/belts near the player.

Utilities
2 months ago
0.13 - 2.0
19.7K
Logistics

i Advanced fluid handling support

2 months ago

Please make the mod "Advanced fluid handling" more fully supported. It has purely underground connectors, and in this case your search returns an "orphan"

https://imgur.com/a/eUtCw1m -- here is example :)

2 months ago
(updated 2 months ago)

I looked at how Advanced Fluid Handling works and correctly detecting orphans of its pipes is just too difficult, which is why I added the Underground pipe mode setting . If you set that to Strict it should at least only check the base game's pipes.

Technical details: certain entities have a neighbours property

  • For underground belts this returns a reference to the other end of the underground belt, making it very easy to check
  • For underground pipes this returns a list of all connected entities, both underground and via the surface pipe. The way I check for an orphan is to loop over these connected entities, check if it is also an underground pipe, which direction it is facing, and which direction it is relative to the pipe I am checking, to detect if it is connected via underground or the surface.
2 months ago

Of course, such a search will take too many resources :) Thanks for the clarifications.

2 months ago
(updated 2 months ago)

It turns out there has been an API addition that makes that search possible (one of the Factorio devs on the Discord was kind enough to point me toward it), and I have updated to support AFH. You can now choose between detecting underground pipes with no underground connections, or detecting underground pipes with one or more unused connections.
Using the Advanced Fluid Handling built-in underground rotation (Ctrl+R) does not automatically remove orphan markers but you can just hit the Orphan Finder hotkey again to turn them off

2 months ago

Wow!! Thank You!! Your mod is great :)

New response