diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 45612e918c2..555b65540d7 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -41,15 +41,24 @@ /obj/machinery/cooker/proc/checkValid(obj/item/check, mob/user) if(on) to_chat(user, "[src] is still active!") - return 0 - if(istype(check, /obj/item/reagent_containers/food/snacks)) - return 1 + return FALSE if(istype(check, /obj/item/grab)) return special_attack(check, user) if(has_specials && checkSpecials(check)) return TRUE - to_chat(user, "You can only process food!") - return 0 + if(istype(check, /obj/item/reagent_containers/food/snacks) || emagged) + if(istype(check, /obj/item/disk/nuclear)) //(1984 voice) you will not deep fry the NAD + to_chat(user, "The disk is more useful raw than [thiscooktype].") + return FALSE + var/obj/item/disk/nuclear/datdisk = locate() in check + if(datdisk) + to_chat(user, "You get the feeling that something very important is inside this. Something that shouldn't be [thiscooktype].") + return FALSE + if(check.flags & (ABSTRACT | DROPDEL | NODROP)) //you will not deep fry the armblade + return FALSE + return TRUE + to_chat(user, "You can only process food!") + return FALSE /obj/machinery/cooker/proc/setIcon(obj/item/copyme, obj/item/copyto) copyto.color = foodcolor @@ -119,6 +128,14 @@ to_chat(user, "That is already [thiscooktype], it would do nothing!") return putIn(I, user) + for(var/mob/living/L in I.contents) //Emagged cookers - Any mob put in will not survive the trip + if(L.stat != DEAD) + if(ispAI(L)) //Snowflake check because pAIs are weird + var/mob/living/silicon/pai/P = L + P.death(cleanWipe = TRUE) + else + L.death() + break sleep(cooktime) if(I && I.loc == src) //New interaction to allow special foods to be made/cooked via deepfryer without removing original functionality 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 681ddb591a2..3bf50dbad16 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -43,6 +43,18 @@ var/obj/item/reagent_containers/food/snacks/deepfryholder/type = new(get_turf(src)) return type +/obj/machinery/cooker/deepfryer/examine(mob/user) + . = ..() + if(emagged) + . += "The heating element is smoking slightly." + +/obj/machinery/cooker/deepfryer/emag_act() + if(!emagged) + to_chat(usr, "You short out the fryer's safeties, allowing non-food objects to be placed in the oil.") + playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) + emagged = TRUE + return + /obj/machinery/cooker/deepfryer/special_attack(obj/item/grab/G, mob/user) if(ishuman(G.affecting)) if(G.state < GRAB_AGGRESSIVE)