Files
Bubberstation/code/datums/components
SmArtKar bcb5c47571 Implements shared particle holders, re-adds slimed status particles using the new system (#87892)
## About The Pull Request

Partial revert of #86701
Implements a shared holder particle system, somewhat inspired by
https://github.com/Baystation12/Baystation12/pull/34014 (thanks Kapu).
Atoms can be assigned "shared" particles via add_shared_particles, with
an optional "alternate" key passed as a second arg if you're planning to
edit the returned particle holder (for example, color it like slimed
status does). Removing is done via remove_shared_particles with an
option to delete the shared holder if nothing is using it anymore (on by
default). This system should be prioritized over normal particle holders
when a lot of entities would be using a certain particle effect (like
fires) as it conserves a lot of clientside performance.

Burning, acid, decaying, firestacks and slimed status now use this
system which should help with clientside performance and amount of atoms
created/destroyed.

## Why It's Good For The Game

Less clientside lag.

## Changelog
🆑
refactor: Firestacks, burning/acid/decaying effects and (brought back
after being temporarily removed) slimed status effects now use a new
"shared" particles system, which should considerably improve client
performance when encountering a lot of burning/slimed entities.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-11-20 13:46:00 +01:00
..
2024-11-19 15:19:44 -05:00
2024-05-16 19:54:00 -07:00
2024-10-09 02:03:50 +02:00
2024-08-15 01:28:21 +01:00
2024-05-16 19:54:00 -07:00
2024-05-16 19:54:00 -07:00
2024-08-21 17:07:02 +12:00
2024-03-27 16:49:46 -06:00
2024-07-15 16:28:41 +01:00
2024-10-09 02:03:50 +02:00
2024-10-09 02:03:50 +02:00
2024-10-07 13:34:36 +02:00
2024-05-16 19:54:00 -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