Files
Bubberstation/code/datums/components
san7890 b6900a6d27 Fixes Bread Smite Causing Some Fucked Up Shit (#69853)
* Fixes Bread Smite Causing Some Fucked Up Shit

Hey there,

So basically, when you had the bread smite done on you, you were _just_ added to the contents of the bread. Nothing more. That means that you could pick it up. You couldn't add it to your bag (it would always return back into your hand(?)), but it would create some weird oddities that was just cursed in general. Let's make it so you can't hold the container that you are contained within by giving you HANDS_BLOCKED.

* actually we don't need the named arg

lets get rid of the cursed thing entirely

* removes sanity check

* we do a bit of component trolling

THIS TOOK ME TWO HOURS FUCK YOU

* removes cruft comment

* cleans up code a teeny bit, upgrades to incapacitated

* wait that named arg is still there wtf

* Review Time

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>

* wrong operator and wrong order of operations

* null out the container

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>

* checks to see if container is qdeld

* weakref time

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-09-15 08:12:31 -04:00
..
2022-04-01 21:07:46 -04:00
2022-08-25 20:13:36 -07:00
2022-06-01 19:41:46 -04:00
2022-06-16 22:36:10 +01:00
2022-08-05 09:32:02 +12:00
2022-08-23 21:17:30 +02:00
2022-08-30 20:28:11 -07:00
2022-09-13 13:02:51 +12:00
2022-08-05 09:32:02 +12:00
2022-04-01 21:07:46 -04:00
2022-08-05 09:32:02 +12: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