From 22817a12015676a6764377cb9143e4d00cc5c294 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 27 Sep 2023 22:51:13 -0500 Subject: [PATCH] better.... --- .../kitchen_machinery/microwave.dm | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index 83817e086634..11096f275d0c 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -394,18 +394,19 @@ tocook = null /obj/item/ration_heater/proc/cook() - var/cookturf = get_turf(tocook) - tocook.visible_message("\The [src] lets out a final hiss...") - playsound(tocook, 'sound/items/cig_snuff.ogg', 50, 1) - if(istype(tocook, /obj/item/reagent_containers/food) || istype(tocook, /obj/item/grown)) - tocook.visible_message("\The [tocook] is done warming up!") - tocook.microwave_act() - clear_cooking() - if(uses == 0) - qdel() - else - uses-- - src.forceMove(cookturf) + if(!QDELETED(tocook)) + var/cookturf = get_turf(tocook) + tocook.visible_message("\The [src] lets out a final hiss...") + playsound(tocook, 'sound/items/cig_snuff.ogg', 50, 1) + if(istype(tocook, /obj/item/reagent_containers/food) || istype(tocook, /obj/item/grown)) + tocook.visible_message("\The [tocook] is done warming up!") + tocook.microwave_act() + clear_cooking() + if(uses == 0) + qdel() + else + uses-- + src.forceMove(cookturf) /obj/item/ration_heater/examine(mob/user) . = ..()