Files
Bubberstation/code/datums/components
_0Steven e4b8a68220 Move food_storage to item interaction signals, fixes not being able to embed syringes into cake/bread/cheese (#87059)
## About The Pull Request

So we have a feature for embedding small objects into cake/bread/cheese,
where if you eat it there's a chance you bite into it.
For syringes, this means you get injected by it.

However, it seems that this is currently broken, being unable to ever
reach this state due to order of operations.
Moving this component to the newer
`COMSIG_ATOM_ITEM_INTERACTION_SECONDARY` signal fixes this.

As a side, replaces an `a` with `\a` so it doesn't display "a the X" for
different syringes being bitten into.
Edit: Additionally turned an if into an early return in the food storage
insertion procs.

## Why It's Good For The Game

Better when things work as intended.
## Changelog
🆑
fix: Syringes can be put into cake/bread/cheese on right click again.
spellcheck: Biting into a hidden syringe no longer displays things like
"a the syringe".
/🆑
2024-11-11 00:43:38 -08:00
..
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07:00
2024-10-19 08:04:33 -07: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 its 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