Files
Bubberstation/code/datums/components
SkyratBot 673eb1ee1d [MIRROR] Ghosts can eat ghost burgers [MDB IGNORE] (#23746)
* Ghosts can eat ghost burgers (#78303)

## About The Pull Request

Every tick while a ghost is orbiting a ghost burger there is a 20%
chance per ghost (capping at 100% at 5 ghosts) that they will take a
bite out of the ghost burger, shrinking it and depleting its reagents
until it is completely consumed.
It leaves some ectoplasm behind which you could use to make another
burger.
Also ghost burgers can no longer decay or pick up floor germs, the
burger moves itself so this would happen reasonably often because it
doesn't stay on tables. Also: it is a ghost.

Also just before I posted this PR I noticed that "booberry muffins" also
exist so there was nothing for it but to componentise this behaviour and
attach it to both food items, so I guess admins can also make anything
with reagents edible to ghosts also.

## Why It's Good For The Game

I think the chef should be able to make food for ghosts. It's not fair
if only living people get to eat.

## Changelog

🆑
add: Ghosts (observers) can eat ghost burgers and booberry muffins.
balance: Ghost burgers will not decay or pick up germs due to the fact
that they moved themselves off a table.
/🆑

* Ghosts can eat ghost burgers

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-17 15:32:47 -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