From b497ce09aba89a909230b4eacc9446b7cf8d107a Mon Sep 17 00:00:00 2001 From: LetterJay Date: Wed, 19 Jul 2017 04:52:47 -0500 Subject: [PATCH] Update iv_drip.dm --- code/game/machinery/iv_drip.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index abc502c2eb..41b688d19c 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -1,3 +1,6 @@ +#define IV_TAKING 0 +#define IV_INJECTING 1 + /obj/machinery/iv_drip name = "\improper IV drip" icon = 'icons/obj/iv_drip.dmi' @@ -5,7 +8,7 @@ anchored = FALSE mouse_drag_pointer = MOUSE_ACTIVE_POINTER var/mob/living/carbon/attached = null - var/mode = 1 // 1 is injecting, 0 is taking blood. + var/mode = IV_INJECTING var/obj/item/weapon/reagent_containers/beaker = null var/list/drip_containers = list(/obj/item/weapon/reagent_containers/blood, /obj/item/weapon/reagent_containers/food, @@ -15,6 +18,11 @@ ..() update_icon() drip_containers = typecacheof(drip_containers) + +/obj/machinery/iv_drip/Destroy() + attached = null + QDEL_NULL(beaker) + return ..() /obj/machinery/iv_drip/update_icon() if(attached) @@ -208,4 +216,4 @@ to_chat(user, "[attached ? attached : "No one"] is attached.") #undef IV_TAKING -#undef IV_INJECTING \ No newline at end of file +#undef IV_INJECTING