TL;DR
It should be possible to pump empty a pipe and then use it for a different liquid without having to deconstruct/reconstruct it.What ?
Pipes are now locked into one liquid by eithera) a fluid box has a filter for a specific liquid.
b) some liquid is present in the pipe.
My suggestion is to relax b. Liquid in a pipe only locks the pipe to that liquid if it is a noticeable amount (that can still be pumped out of any reasonably large pipe system). I suggest trying 0.001 or 0.01.
Secondly if a pipe gains a lock into a new liquid all other remaining liquid is destroyed. This would be at most 0.001 * pipes/tanks/pumps in the fluid system.
Note: In a 1000 pipes long pipe one might loose 1 unit of liquid on change. I think that is acceptable.
Why ?
Having to deconstruct all pipes and rebuilding them because the wrong liquid got into the pipe is a pain. Pipes longer than a few pipes and/or forks can't be pumped completely so deconstruction is the only way to clear them.There have been other requests with complicated ideas and requests to redesign the whole fluid system. All of that is far t complex to get fixed fast. This idea though would be a simple quick fix that's good enough right now instead of waiting for perfect in a year (or 2 or 3 or 10).