Files
Bubberstation/code/__DEFINES/particles.dm
SkyratBot 9cee4ee779 [MIRROR] Optimizes particle holders [MDB IGNORE] (#20599)
* Optimizes particle holders (#74524)

## About The Pull Request

It isn't really an issue now, but these will be used more in future, so
let's start off strong.

There's a lot of work going on here that doesn't really need to be
happening, mostly off not knowing a trickTM.

Biggest one is vis_locs and vis_contents are linked lists, being in one
requires being in another. Atoms clear out their vis_locs on Destroy, so
we do not need to "own" references to things that have us in their
vis_contents.

This combined with knowing our old loc's loc off Moved made the use of
weakrefs here unneeded. Similarly, atoms inside atom movables qdel on
when the upper layer is deleted, so most cases of the qdeleting signal
were unneeded.

Also, we only cared about movement if we were an item (speaking of
which, I swapped out the isitem stuff with a flag that gets passed into
the new() call)

## Why It's Good For The Game

Speed

* Optimizes particle holders

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-04-16 23:59:20 +01:00

6 lines
226 B
Plaintext

// /obj/effect/abstract/particle_holder/var/particle_flags
// Flags that effect how a particle holder displays something
/// If we're inside something inside a mob, display off that mob too
#define PARTICLE_ATTACH_MOB (1<<0)