From 31967bed59d8abf995d4dbb85e0a1be86dee427a Mon Sep 17 00:00:00 2001 From: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Date: Thu, 4 Jun 2026 14:32:12 -0500 Subject: [PATCH] Makes Destroy() a protected proc to safeguard against improper calls (#96331) --- code/controllers/subsystem/garbage.dm | 2 +- code/datums/datum.dm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index ae01679b094..efd23d83163 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -374,7 +374,7 @@ SUBSYSTEM_DEF(garbage) var/start_time = world.time var/start_tick = world.tick_usage SEND_SIGNAL(to_delete, COMSIG_QDELETING, force) // Let the (remaining) components know about the result of Destroy - var/hint = to_delete.Destroy(force) // Let our friend know they're about to get fucked up. + var/hint = UNLINT(to_delete.Destroy(force)) // Let our friend know they're about to get fucked up. if(world.time != start_time) trash.slept_destroy++ diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 39c0f9ab284..5ed606ebeaa 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -87,7 +87,7 @@ /** * Parent types. - * + * * Abstract-ness is a meta-property of a class that is used to indicate * that the class is intended to be used as a base class for others, and * should not (or cannot) be instantiated. @@ -123,6 +123,7 @@ * Returns [QDEL_HINT_QUEUE] */ /datum/proc/Destroy(force = FALSE) + PROTECTED_PROC(TRUE) SHOULD_CALL_PARENT(TRUE) SHOULD_NOT_SLEEP(TRUE) tag = null