Files
Bubberstation/code/datums/components
SkyratBot 3687a2c0dc [MIRROR] Two more early traitor objectives for minor vandalism [MDB IGNORE] (#15262)
* Two more early traitor objectives for minor vandalism (#68036)

* Test commit, adds file.

Adds the actual game implementation

Revert "Feature/ratlain"

Adds hiding shards behind posters.
Begins adding evil posters which make you sad if you look at them.

Refactors 'seeing' to use proximity sensors.
This is both more efficient and allows both propaganda tools to share code.
Added most of the implementation for grafitti too, needs splitting into its own file.

* Separated objectives into different files
* Adds the graffiti objective
* Adds demoraliser component for shared behaviour between disparate items
* Soap now calls wash() instead of just qdeling things by itself

Adds file I forgot to commit.

* Remove pointless 'var's
* Makes my abstract objective abstract, probably?

Missed one remaining instance of unecessary var

* Alphabetises tgstation.dme

Tiny change to flavour text.

Removes random unwanted pixel.

* * Refactors how signals are handled across the code and moves filtering to a more appropriate place.
* Handily removes owner object which we don't need any more.
* Adds some early returns.
* Adds missing call to super in contraband.dm attackby.

* That was supposed to be a commit not also a push.
Reverts one change I didn't want to make which also allows this to compile.

* * Removes unecessary tracking of rune in spraycan
* Simplifies spam protection
* Unregister signals in "ungenerate_objective" rather than bespoke proc
* Removes pointless type cast applied two lines before type guarding it again
* Fixes some formatting
* Replaces mob/living/human with mob/living in demoraliser, if Ian get a mood component then why not demoralise him too?
* Adds missing comment
* Updates bad proc name

* * Moves proc from demoraliser to mood
* Replaces reference to glass shard trap with a weakref
* Cleans up some lines which were left after refactoring
* Corrects timing of setting `drawing_rune`
* More early returns

* Test

* Removes trailing /
Replaces . = ..() with a later return ..() in a couple of places

* Restores failure penalty
Adds weight to objective category

* Adds penalty to missed file.

* Separates slipping on graffiti to its own signal
Removes a duplicate comment
More early returns

* Renames vague var.

* Two more early traitor objectives for minor vandalism

* aaaaa

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2022-07-30 13:25:31 -07:00
..
2022-05-09 15:05:42 +01:00
2022-04-06 19:26:58 +01:00
2022-07-30 09:38:31 -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 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