Atomized from the proc holder PR
Refactors gunlight / helmet light to be a component.
They just copy+pasted code between each other and it was really annoying. I was working on fixes for the proc holder PR and noticed this (had to make the same fix for two things).
Moved Mind Monkey Helmet to its own file
Balloon alerts for seclite attachment / removal
One may be able to genericize this even further and put the bayonet behavior on this as well. Future idea.
Why It's Good For The Game
Cleaner, less copy pasted code.
Changelog
cl Melbert
refactor: Gunlight / Helmetlight behavior is now a component.
qol: Gunlight / Helmetlight now uses balloon alerts.
/cl
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.