Files
Bubberstation/code/datums/components
SkyratBot 79eb1d4131 [MIRROR] Jousting now unregisters the current holder [MDB IGNORE] (#22291)
* Jousting now unregisters the current holder (#76589)

## About The Pull Request

Fixes the args of on_equip and on_drop for active items
Picking an item up will unregister from the old user (in case it
transfers inventory)
Unregister's signal from current holder instead of whoever drops it. It
should be the same in each case but there may have some edge case where
on drop isn't called? This is more to just be safe.

## Why It's Good For The Game

Jousting won't runtime as much.

## Changelog

🆑
code: Jousting now registers/unregisters properly on two-handed items.
/🆑

* Jousting now unregisters the current holder

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-07-11 20:08:24 -04: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.

HackMD page for an introduction to the system as a whole.

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