Page 1 of 1

Factorio 2.1 reversible pump

Posted: Thu Jul 02, 2026 9:40 pm
by i-make-robots
Hello all,

I'm trying to make a bi-directional pump. Now that devices can have a separate signal on each wire, I want one to act as before - enable/disable - and one to switch direction of flow.

My use case is in stations that load many liquids. The default pump would have a little liquid stuck inside, jamming the queue. If I can set "reverse pump when train count C==0" the pump/pipe will get flushed and problem is solved.

LuaPumpControlBehavior does not, by default, give me a way to reverse flow. One option is to spawn two pumps on top of each other, one of which is inactive at any given time. Another is to somehow track the "original" direction and then physically reverse the pump when the signal is set.

What would be best?

Thanks!

Re: Factorio 2.1 reversible pump

Posted: Thu Jul 02, 2026 11:42 pm
by Osmo
Both of these options may work.
For the first option, i think you can create linked fluidboxes such that one of the pumps would be conected to the other on each side, so fluid will be able to flow into both of them, and you'd just need to set one enabled and the other disabled. But it might be possible for fluids to be stuck in one of thr pumps, not sure.
For the second option, you might also get an issue where you change the direction of the pump, and the fluids swap sides. Not sure if that's what would happen.
If the first option doesn't have any issues with leftover fluids, that would probably be the preffered option since you could do it without on_tick scripts (have both pumps have opposite circuit conditions).
But if it does have some issues, in both cases you should be able to remmeber the fluids beforehand and set them later by script to circumvent that. So choose whichever one is easier to implement.

Re: Factorio 2.1 reversible pump

Posted: Sat Jul 04, 2026 1:47 am
by i-make-robots
Cool. How do i add a UI under Enable for the Pump Reverse?