Files
Bubberstation/code/datums/components
Paxilmaniac ac756c9f3e Componentizes loomability (#74552)
## About The Pull Request

As shrimple as the title might imply, the ability for an item to be
processed in a loom is now a component.

Behavior on looming cotton, durathread, and wool, should all be the
exact same in terms of cost, time, results, etc.
## Why It's Good For The Game

If, for any reason, someone might want to extend the behavior of "this
thing can be loomed" to other items, it can be done.
## Changelog
🆑
code: The ability for objects to be loomed is now a component, with all
of the looming behavior moved off of the structure and into said
component. The actual behavior for looming cotton (clicking on a loom
with cotton) is completely unchanged.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-04-08 18:53:23 +00:00
..
2023-01-17 10:02:20 -08:00
2023-04-08 18:53:23 +00:00
2023-04-04 16:04:27 -05: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