mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 06:21:57 +00:00
* More optimizations for reagent code (#80529) ## About The Pull Request 1. Removed offsetting reagent volumes by the quantization/rounding constants before comparing values. Not required since the final total volume is rounded inside the reagent holder anyway. 2. Removed excessive calls to the hottest proc in reagent code i.e. `update_total()` per reaction step. Speeds up reactions even more. 3. Removed rounding of volumes (like in liver, pyrotechnics, overheated reactions) where the volume is already rounded inside the holder. 4. Avoid calling `handle_reactions()` if the holder is already reacting when adding new reagents. ## Changelog 🆑 code: removed excess calls to `update_total()` making reaction code slightly faster. code: removed excessive use of chemical constants (quantisation & rounding constants) in places where they were not needed i.e. plumbing buffer, reaction chamber, pyrotechnics & the liver. /🆑 * More optimizations for reagent code --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>