A way to see if a pump is connected to a rail
Posted: Sat Nov 17, 2018 2:28 pm
I'd just like a way to return if a pump is connected to a rail. Preferably it would return the rail it's connected to.
Use case: I count neighbours on fluidboxes for pumps and pipes. I have it so if the fluidboxes don't have at least two neighbours, it's considered an orphan. Problem being that the fluid box and rail are not neighbours so it thinks it's an orphan. I could do a bunch of directional position checking, but a way to just pull the rail as a method would be far more efficient.
![Image](https://forums.factorio.com/images/ext/2924860cd6383eb4644a04ef6241a8f9.png)
Use case: I count neighbours on fluidboxes for pumps and pipes. I have it so if the fluidboxes don't have at least two neighbours, it's considered an orphan. Problem being that the fluid box and rail are not neighbours so it thinks it's an orphan. I could do a bunch of directional position checking, but a way to just pull the rail as a method would be far more efficient.
![Image](https://forums.factorio.com/images/ext/2924860cd6383eb4644a04ef6241a8f9.png)