Files
Bubberstation/code/datums/components
ChungusGamer666 8d82924187 Implanted foreign bodyparts will resist being removed on species change (#74701)
## About The Pull Request

Title.
Also, to make bodypart code slightly nicer, I retooled some variables to
be part of a new bitfield called bodypart_flags.

## Why It's Good For The Game

We've been trying to move away from the species datum for limb stuff
precisely because of funny shenanigans like this, no?

## Changelog

🆑
refactor: Implanted foreign limbs will no longer be wiped by species
change.
/🆑
2023-04-14 20:50:22 +02:00
..
2023-01-17 10:02:20 -08:00
2023-04-08 18:53:23 +00:00
2022-12-28 12:48:08 +01:00
2023-04-05 16:54:22 +01: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