Files
Bubberstation/code/datums/components
SyncIt21 ecf99a90e5 [NO GBP]Fixes plumbing for good(hopefully) & more reagent code (#78947)
## About The Pull Request
1. This should be the end of all problems related to plumbing and I
swear if another issue popes up I'm goanna delete my GitHub account. Or
to be more realistic just ping me and I'll be back :D

   - Fixes #78945
  
And this time I am **100%**(if I'm wrong then fuck me) sure that
reagents will not flow in excess amounts into reaction
chambers/synthesizers or whatever plumbing component you can think off.
    
Reagents flowing in excess amounts is what caused the factory to grind
to a halt as the components will stop processing if they detect excess
amounts of reagents (which is why plunging them with a plunger would
clear them of their reagents and help them resume processing again which
obviously is not an ideal solution)
    
Also, now it's no longer required to see reagent volumes in 4 decimal
places so I rounded it back to just 2 places again so values like 0.999
or 1.001 will become just 1 again.
    
Also plumbing reaction chamber was doing too much work so I fixed that.

2. Made defines for min & max ph. any change to ph values of any reagent
will be confined between these values i.e., 0 & 14. Also converted some
vars into defines. Using a variable makes sense if it's value changes
but if it doesn't then just define it as a constant so you can save
memory. Made synthesizer lists static to further save memory.

3. Significantly boosted the ph balancing mechanism for reaction
chamber. You will be surprised.

## Changelog
🆑
fix: plumbing setups should(hopefully) no longer grind to a halt nor
will overflow with excess volume of reagents.
code: created defines for min & max ph. Improved some reaction_reagent
code. Made synthesizer dispensable reagent list values static to save
memory.
refactor: ph balancing mechanism for reaction chamber is significantly
improved. Optimized it's code overall
refactor: examining each individual reagent will display their results
back to 2 decimal places again and not 4 for easy readability.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-10-15 18:26:51 +00:00
..
2023-08-22 01:26:34 +00:00
2023-08-16 13:04:41 -06:00
2023-09-19 19:07:51 +00:00
2023-10-11 16:58:29 -06:00
2023-10-08 03:04:35 +01:00
2023-08-16 13:04:41 -06:00
2023-07-12 18:52:02 -06:00
2023-10-05 13:20:16 -06:00
2023-08-14 12:39:30 -06:00
2023-10-14 15:53:28 -07:00
2023-09-07 20:25:52 +01:00

Datum Component System (DCS)

Concept

Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a SendSignal() call. Now every component that want's to can also know about this happening.

HackMD page for an introduction to the system as a whole.

See/Define signals and their arguments in __DEFINES\components.dm