Makes Destroy() a protected proc to safeguard against improper calls (#96331)

This commit is contained in:
mrmanlikesbt
2026-06-04 15:32:12 -04:00
committed by GitHub
parent d55c25d00c
commit 31967bed59
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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++
+2 -1
View File
@@ -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