qdel(reagent) adjustments.

Attempts to ensure qdel(reagents) only occur once per Destroy()
This commit is contained in:
PsiOmegaDelta
2015-08-13 10:26:31 +02:00
parent 98c2a0c8b1
commit d1e8f670b2
4 changed files with 4 additions and 13 deletions

View File

@@ -39,6 +39,7 @@
. = ..()
if(reagents)
qdel(reagents)
reagents = null
for(var/atom/movable/AM in contents)
qdel(AM)
loc = null

View File

@@ -100,10 +100,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
/obj/item/clothing/mask/smokable/Destroy()
..()
qdel(reagents)
/obj/item/clothing/mask/smokable/process()
var/turf/location = get_turf(src)
smoketime--

View File

@@ -146,11 +146,6 @@
new /obj/item/clothing/mask/smokable/cigarette(src)
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
/obj/item/weapon/storage/fancy/cigarettes/Destroy()
qdel(reagents)
..()
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
return
@@ -202,10 +197,6 @@
new /obj/item/clothing/mask/smokable/cigarette/cigar(src)
create_reagents(15 * storage_slots)
/obj/item/weapon/storage/fancy/cigar/Destroy()
qdel(reagents)
..()
/obj/item/weapon/storage/fancy/cigar/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
return

View File

@@ -17,6 +17,9 @@
germ_level++
/mob/living/carbon/Destroy()
qdel(ingested)
qdel(touching)
// We don't qdel(bloodstr) because it's the same as qdel(reagents)
for(var/guts in internal_organs)
qdel(guts)
for(var/food in stomach_contents)