fixes particle holders not naturally gcing (#25438)

This commit is contained in:
GDN
2024-05-09 01:14:33 +00:00
committed by GitHub
parent 15535963ec
commit 10e32fd380
+3 -1
View File
@@ -159,7 +159,7 @@
///typepath of the last location we're in, if it's different when moved then we need to update vis contents
var/last_attached_location_type
/// The main item we're attached to at the moment, particle holders hold particles for something
var/atom/parent
var/atom/movable/parent
/// The mob that is holding our item
var/mob/holding_parent
@@ -181,6 +181,7 @@
if(parent)
UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING))
QDEL_NULL(particles)
parent.vis_contents -= src
return ..()
///signal called when parent is moved
@@ -192,6 +193,7 @@
///signal called when parent is deleted
/obj/effect/abstract/particle_holder/proc/on_qdel(atom/movable/attached, force)
SIGNAL_HANDLER
attached.vis_contents -= src
qdel(src)//our parent is gone and we need to be as well
///logic proc for particle holders, aka where they move.