Files
Bubberstation/code/modules/plumbing
SyncIt21 f1ee833823 Final reagent enhancements (#89289)
## About The Pull Request
**1. Code Improvements**
- `get_reagent_log_string()` now won't round reagent volumes cause they
are already rounded by `update_total()` so its slightly faster
- `trans_to()` now logs reagents faster as it does it in place without
the overhead of passing the list to `get_external_reagent_log_string()`
which parses our list into another list which is just unessassary
- `trans_to()` is now faster performance wise as it no longer relies on
`remove_reagent()` to remove the reagent
- Merged `multiply_single_reagent()` into a single proc `multiply()`
which does the job for both single & multiple reagents to reduce code.
it now no longer uses proc `remove_reagent()` making it faster when
reducing reagents
- `copy_to()` no longer rounds its return value thus improving
performance & won't return false negatives for values lesser than 0.01

**2. Fixes**
- Fixes `multiply_single_reagent()` multiplying reagent subtypes as well
instead of just the target type as it uses `locate()`
- Fixes `multiply_reagents()` multiplying reagents twice. Notice how it
would call `_multiply_reagent()` & then again do the exact same thing as
that proc in the next line

dfe9f50ad7/code/modules/reagents/chemistry/holder/holder.dm (L605-L609)
- `convert_reagent()` actually uses the weighted ph. I was wrong in what
I assumed `override_base_ph` did

Just lesser & faster code overall

## Changelog
🆑
fix: multiplying reagents in cases like fishing & chem splash will yield
accurate results. New amounts differ from present values
fix: converting reagents actually yields correct ph again
code: improved performance of reagent logging
code: copying reagents won't return false negatives for values lesser
than 0.01
/🆑
2025-02-17 00:45:13 +01:00
..