Files
Bubberstation/code/datums/components
SkyratBot 91837e26b4 [MIRROR] Progress bars & cleaning particles will centre on the tile occupied by large icon objects [MDB IGNORE] (#23394)
* Progress bars & cleaning particles will centre on the tile occupied by large icon objects (#77940)

## About The Pull Request

Do_after bars always draw based on the top-left corner of the targetted
atom, for atoms with sprites that are larger than 32x32 this gives them
a weird offset instead of being centred, which bugs me.
I have tried my best to figure out a way to reverse this which does not
interfere with atoms which use pixel_x/pixel_y to visually appear to be
on a different tile.

## Why It's Good For The Game

Before:

![image](https://github.com/tgstation/tgstation/assets/7483112/a1127695-58fa-40fc-aa0a-6bc8a0589e74)
he hates how you missed him completely 😦

After:

![image](https://github.com/tgstation/tgstation/assets/7483112/deb4fbb8-e286-46b4-84a7-82b65b4f1eee)
now you're cleaning his feet 🙂

## Changelog

🆑
image: progress bars and cleaning particles are now centered on the tile
occupied by the target, if it is a big sprite
/🆑

* Progress bars & cleaning particles will centre on the tile occupied by large icon objects

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-08-28 23:40:16 -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