mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 00:51:23 +00:00
* Bring back painting arbitrary objects with spray cans (#52936) Brings back the behavior removed from #52186 with cleaner code. Differences in the code: No more explicit type checks in the spray paint code, other than a broad isobj. Checking for dark colors is now based on luminosity, rather than unscientifically summing all the RGB components and checking an arbitrary number. Removes the paintable component. This was used on one item, and its behavior is replicated in the spray can. Instead of checking for windows specifically and changing opacity through there, atoms can now specify through init flags whether or not they allow dark colors. Windows set this flag. Adds a COMSIG_OBJ_PAINTED signal. Windows use this signal to dynamically update opacity, just like how they did before. This was a fun cosmetic feature that I'm not sure anyone had a problem with. The original reason for removal seemed to be because of code quality, and not because of negatives about the feature. Makes canvasses unpaintable * Bring back painting arbitrary objects with spray cans Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@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.
See this thread for an introduction to the system as a whole.