From 83d1058b1ac5db87fa706fffec1565cbb1d2027f Mon Sep 17 00:00:00 2001 From: FloFluoro <3611705+FloFluoro@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:21:29 -0400 Subject: [PATCH] Fixes emagged deep fryer softlocks (#18874) --- code/modules/food_and_drinks/kitchen_machinery/cooker.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 0608540bb83..0634ccf1a0a 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -136,7 +136,12 @@ else L.death() break - sleep(cooktime) + addtimer(CALLBACK(src, .proc/finish_cook, I, user), cooktime) + +/obj/machinery/cooker/proc/finish_cook(obj/item/I, mob/user, params) + if(QDELETED(I)) //For situations where the item being cooked gets deleted mid-cook (primed grenades) + turnoff() + return if(I && I.loc == src) //New interaction to allow special foods to be made/cooked via deepfryer without removing original functionality //Define the foods/results on the specific machine --FalseIncarnate