Fixes cleanables not garbage collecting properly (#23553)

This commit is contained in:
Henri215
2023-12-13 21:48:00 -06:00
committed by GitHub
parent e623109668
commit b9fc8bc8b3
@@ -13,13 +13,6 @@
var/gravity_check = TRUE
hud_possible = list(JANI_HUD)
/obj/effect/decal/cleanable/Initialize(mapload)
. = ..()
var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR]
prepare_huds()
jani_hud.add_to_hud(src)
jani_hud_set_sign()
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
if(mergeable_decal)
return TRUE
@@ -103,10 +96,16 @@
QUEUE_SMOOTH_NEIGHBORS(src)
if(iswallturf(loc) && plane == FLOOR_PLANE)
plane = GAME_PLANE // so they can be seen above walls
var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR]
prepare_huds()
jani_hud.add_to_hud(src)
jani_hud_set_sign()
/obj/effect/decal/cleanable/Destroy()
if(smoothing_flags)
QUEUE_SMOOTH_NEIGHBORS(src)
var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR]
jani_hud.remove_from_hud(src)
return ..()
/obj/effect/decal/cleanable/proc/try_merging_decal(turf/T)