From 01fa39a5e66ef81d09a35dd5172ff38aacb52027 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Sun, 21 Oct 2018 12:04:13 -0400 Subject: [PATCH 1/2] Helps Reagents GC Better --- code/modules/reagents/chemistry/holder.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 4a6bf2bdcb1..cbe8c43b936 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -764,5 +764,7 @@ var/const/INGEST = 2 processing_objects -= src QDEL_LIST(reagent_list) reagent_list = null + QDEL_LIST(addiction_list) + addiction_list = null if(my_atom && my_atom.reagents == src) my_atom.reagents = null From 00e3d2c097fbb264d3b9fffdcd2b751adc71c7bf Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Sun, 21 Oct 2018 12:09:45 -0400 Subject: [PATCH 2/2] uhhhhhh --- code/modules/mob/living/living.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 591c62ff862..2a384dec214 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -333,7 +333,7 @@ /mob/living/is_injectable(allowmobs = TRUE) return (allowmobs && reagents && can_inject()) - + /mob/living/is_drawable(allowmobs = TRUE) return (allowmobs && reagents && can_inject()) @@ -365,9 +365,8 @@ C.update_inv_legcuffed() if(C.reagents) - for(var/datum/reagent/R in C.reagents.reagent_list) - C.reagents.clear_reagents() - C.reagents.addiction_list.Cut() + C.reagents.clear_reagents() + QDEL_LIST(C.reagents.addiction_list) // rejuvenate: Called by `revive` to get the mob into a revivable state // the admin "rejuvenate" command calls `revive`, not this proc.