mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
Merge pull request #9672 from PsiOmegaDelta/150604-qdel
Garbage/qdel changes.
This commit is contained in:
@@ -85,14 +85,8 @@ var/list/delayed_garbage = list()
|
|||||||
/proc/qdel(var/datum/A)
|
/proc/qdel(var/datum/A)
|
||||||
if(!A)
|
if(!A)
|
||||||
return
|
return
|
||||||
if(istype(A, /list))
|
|
||||||
var/list/L = A
|
|
||||||
for(var/E in L)
|
|
||||||
qdel(E)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!istype(A))
|
if(!istype(A))
|
||||||
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||||
del(A)
|
del(A)
|
||||||
if(garbage_collector)
|
if(garbage_collector)
|
||||||
garbage_collector.dels++
|
garbage_collector.dels++
|
||||||
|
|||||||
@@ -23,18 +23,6 @@
|
|||||||
//Detective Work, used for the duplicate data points kept in the scanners
|
//Detective Work, used for the duplicate data points kept in the scanners
|
||||||
var/list/original_atom
|
var/list/original_atom
|
||||||
|
|
||||||
/atom/Destroy()
|
|
||||||
. = ..()
|
|
||||||
density = 0
|
|
||||||
set_opacity(0)
|
|
||||||
|
|
||||||
if(reagents)
|
|
||||||
qdel(reagents)
|
|
||||||
reagents = null
|
|
||||||
for(var/atom/movable/AM in contents)
|
|
||||||
qdel(AM)
|
|
||||||
invisibility = 101
|
|
||||||
|
|
||||||
/atom/proc/assume_air(datum/gas_mixture/giver)
|
/atom/proc/assume_air(datum/gas_mixture/giver)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,15 @@
|
|||||||
|
|
||||||
/atom/movable/Destroy()
|
/atom/movable/Destroy()
|
||||||
. = ..()
|
. = ..()
|
||||||
|
if(reagents)
|
||||||
|
qdel(reagents)
|
||||||
|
for(var/atom/movable/AM in contents)
|
||||||
|
qdel(AM)
|
||||||
loc = null
|
loc = null
|
||||||
|
if (pulledby)
|
||||||
|
if (pulledby.pulling == src)
|
||||||
|
pulledby.pulling = null
|
||||||
|
pulledby = null
|
||||||
|
|
||||||
/atom/movable/proc/initialize()
|
/atom/movable/proc/initialize()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user