mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
* Fixes a bug in signal unregistration code that was causing unrelated objects to lose their registration in a (#59116) This was causing unrelated objects to lose their registration in a hyper rare case. The process went something like: when object foo is registered to something and object bar is registered to the same object with a different signal it will remove foo's signal only when foo is the only one registered to the object with that signal Why it's good for the game This was breaking #58918 when blood wasn't qdel'd post test. I'm so happy I found this. It's a rare case, so I doubt it'll effect a lot of things, but I can trust UnregisterSignal again, which is very nice. * Fixes a bug in signal unregistration code Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
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.