mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-06 06:40:42 +01:00
daf55e611c
## About The Pull Request [Improves the documentation of DCS lists, removes old list of callback docs that no longer apply](https://github.com/tgstation/tgstation/commit/c3821d9f5ffaeaa4772f927c819da0c1de0ca27c) [Adds a second signal register to decal rotating, adds a trait to objects under a tile. STOP DIRECTLY READING HIDDEN LISTS I SWEAR TO GOD](https://github.com/tgstation/tgstation/commit/6b3f97a76a6f7d24ab952739a1561633922994e1) [Removes direct reads of the timer list, they were redundant mostly](https://github.com/tgstation/tgstation/commit/14fcd9f8a6d1b2d42ec6df3493ebc76fe7c12032) [Please stop directly reading/modifying the traits list to ensure your dna rot follows the brain](https://github.com/tgstation/tgstation/commit/ec0e5237ec2b7c3b7806cb993670acc8ce388bdc) [Marks internal datum lists as well internal with _](https://github.com/tgstation/tgstation/pull/75769/commits/57c6577ff61629b8ea792ee37ec4f2490a8e2865) [57c6577](https://github.com/tgstation/tgstation/pull/75769/commits/57c6577ff61629b8ea792ee37ec4f2490a8e2865) Does the same to _clear_signal_refs() in hopes of keeping people from touching it ## Why It's Good For The Game They pissed me off. Users should not be touching these lists, especially in ways that make assumptions about their structure and are thus prone to breaking if that ever changes. Most of these are close to zero cost changes, using a wrapper to solve the problem, or just yeeting it Two aren't, Decals with a direction have gained a second signal register on init, and things that sit underfloor (cables/pipes) now get a trait when inserted there. This should have a minimal impact on memory/init time, bugging @Mothblocks about it just in case
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.