mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 16:48:12 +01:00
[MIRROR] selective belly import (#11530)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
8a4c185fb4
commit
87b3497230
@@ -350,6 +350,12 @@ SUBSYSTEM_DEF(garbage)
|
||||
/// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
|
||||
/proc/qdel(datum/to_delete, force = FALSE)
|
||||
if(!istype(to_delete))
|
||||
if(isnull(to_delete))
|
||||
return
|
||||
else if(islist(to_delete))
|
||||
stack_trace("Lists should not be directly passed to qdel! You likely want either list.Cut(), QDEL_LIST(list), QDEL_LIST_ASSOC(list), or QDEL_LIST_ASSOC_VAL(list)")
|
||||
else if(to_delete != world)
|
||||
stack_trace("Tried to qdel possibly invalid value: [to_delete]")
|
||||
del(to_delete)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user