From 2e8cdac9a3a4de57fc5764ec6c5bb8df5da2a41f Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Sat, 26 May 2018 18:13:56 -0400 Subject: [PATCH 1/2] Eatting fried items actually consumes the item (#38054) * Eatting fried items actually consumes the item * destroy --- code/modules/food_and_drinks/food/snacks_bread.dm | 11 +++++++++++ .../food_and_drinks/kitchen_machinery/deep_fryer.dm | 3 +++ 2 files changed, 14 insertions(+) diff --git a/code/modules/food_and_drinks/food/snacks_bread.dm b/code/modules/food_and_drinks/food/snacks_bread.dm index 6c3c4fc935..95c66f019e 100644 --- a/code/modules/food_and_drinks/food/snacks_bread.dm +++ b/code/modules/food_and_drinks/food/snacks_bread.dm @@ -209,6 +209,17 @@ qdel(fried) else fried.forceMove(src) + trash = fried + +/obj/item/reagent_containers/food/snacks/deepfryholder/Destroy() + if(trash) + QDEL_NULL(trash) + . = ..() + +/obj/item/reagent_containers/food/snacks/deepfryholder/On_Consume(mob/living/eater) + if(trash) + QDEL_NULL(trash) + ..() /obj/item/reagent_containers/food/snacks/deepfryholder/proc/fry(cook_time = 30) switch(cook_time) diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index 0f3985040f..36beaf711e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -85,6 +85,9 @@ God bless America. if(!reagents.has_reagent("cooking_oil")) to_chat(user, "[src] has no cooking oil to fry with!") return + if(I.resistance_flags & INDESTRUCTIBLE) + to_chat(user, "You don't feel it would be wise to fry [I]...") + return if(istype(I, /obj/item/reagent_containers/food/snacks/deepfryholder)) to_chat(user, "Your cooking skills are not up to the legendary Doublefry technique.") return