Files
Bubberstation/code/datums/components
SkyratBot 14c0d69476 [MIRROR] Refactors shielded hardsuits into a component, fixes kisses consuming shield charges (#4674)
* Refactors shielded hardsuits into a component, fixes kisses consuming shield charges (#57797)

Shielded hardsuits (like the syndie ones) and shielded cult robes, despite functioning very similarly, were actually implemented twice in their own pockets of clothing code. This merges them into one component that lets you block a certain number of attacks while your suit has charges, and have the suit recharge itself after going so long without being hit (optional, cult robes still don't regain lost charges).

This PR also fixes harmless kiss projectiles consuming charges on shielded suits, I'm sure to much disappointment. They'll now pass directly through though, so you can still try your luck to see if love truly conquers all (it probably won't).

One casualty of this is that you can no longer toggle the shield color of syndie hardsuits with a multitool since that it was annoying to componentize, not something that affected gameplay, and probably something noone knew you could do anyway.

Fixes: #57723

* Refactors shielded hardsuits into a component, fixes kisses consuming shield charges

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2021-04-05 20:22:49 +01:00
..
2021-02-19 16:08:09 +00:00
2021-03-07 02:29:00 +00:00
2021-02-19 16:08:09 +00: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.

See this thread for an introduction to the system as a whole.

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