Adds Destroys.

This commit is contained in:
PsiOmega
2015-04-24 17:11:14 +02:00
parent 1ae0ad6d92
commit e7d85f8edc
91 changed files with 475 additions and 190 deletions
@@ -649,6 +649,15 @@ datum
return trans_data
datum/reagents/Destroy()
..()
for(var/datum/reagent/R in reagent_list)
qdel(R)
reagent_list.Cut()
reagent_list = null
if(my_atom && my_atom.reagents == src)
my_atom.reagents = null
///////////////////////////////////////////////////////////////////////////////////
+6 -2
View File
@@ -162,7 +162,7 @@ datum
/* Must check the transfering of reagents and their data first. They all can point to one disease datum.
Del()
Destroy()
if(src.data["virus"])
var/datum/disease/D = src.data["virus"]
D.cure(0)
@@ -1790,7 +1790,7 @@ datum
..()
return
Del()
Destroy()
if(holder && ismob(holder.my_atom))
var/mob/M = holder.my_atom
M.status_flags &= ~FAKEDEATH
@@ -4428,5 +4428,9 @@ datum
..()
return
datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
..()
holder = null
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
#undef REM