mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-12 18:51:53 +00:00
## About The Pull Request - Fixes #84361 This brings back the round robin method of transferring reagents I removed in #78884 but in a more miniaturized & light weight form. It should speed up cpu performance of plumbing as a whole **The Downside** The reason i was hesitant about bringing it back is because this technique can result in **missing reagents** For example let's say our plumbing pill press has only space for 10u more of reagents but in the ducts we have say 3 reagents i.e 3u copper, 7u Aluminium, 4u iron(Order of reagents in the ducts is important) When the pill press makes the request for 10u of reagents from the ducts we get 3u copper + 7u Aluminium = 10u. **We completely leave out iron** because the 10u request has been fulfilled. This happens when the below 2 conditions are met - When there are a large number(different types) of reagents or large volume of one type of reagent in the ducts - When there isn't enough space in the machinery to take in all these reagents This is why the plunger was made so you can flush out reagents from machines and can make space to take in those missing reagents **The Upside** You don't get any floating point errors. Also given that this code has been around for years before i removed it, It should be ok to bring it back. Assuming players have always been sensible to only create the exact volume of reagents they need without making excess & quickly push out these reagents (either through output gate, pill press etc) from the ducts you should not see any problems. Plus this code is only exclusive to plumbing so no outside usage  **Other changes** - Plumbing IV Drip now only accepts reagents i.e. it only has a input pipe no output pipe just like your output gate & smoke machine. This was done because it is not an instance of `obj/machinery/plumbing` & so it won't use the round robin transfer technique leading to again re-introducing errors in the plumbing system. Also it makes sense as in we only need it to accept reagents from the ducts & inject it into the connected mob/whatever. We don't need it to pump out reagents back into the system - Output gate still uses the regular "proportional" method of transferring reagents. This is so if you use a beaker or something to take reagents out from it, it gives you all reagents without "missing any" ## Changelog 🆑 fix: plumbing machinery should have consistent volumes throughout the course of its operations fix: plumbing iv drop now only accepts reagents from ducts but won't put reagents back into it i.e. it only has a input pipe /🆑