diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 84f08ffed28..1c8db0d9b20 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -42,7 +42,7 @@ if(istype(check, /obj/item/weapon/reagent_containers/food/snacks)) return 1 if(istype(check, /obj/item/weapon/grab)) - return 0 + return special_attack(check, user) to_chat(user, "You can only process food!") return 0 @@ -113,36 +113,6 @@ to_chat(user, "Close the panel first!") return if(!checkValid(I, user)) - if(istype(I, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = I - if(istype(G.affecting, /mob/living/carbon/human) && (G.affecting.get_species() != "Machine")) -// if(!iscarbon(G.affecting)) -// to_chat(user, "You can only harm carbon-based creatures this way!") -// return -// if(G.affecting.stat == DEAD) -// to_chat(user, "[G.affecting] is dead!") -// return - if(G.state < GRAB_AGGRESSIVE) - to_chat(user, "You need a better grip to do that!") - return - var/mob/living/carbon/human/C = G.affecting - var/obj/item/organ/external/head/head = C.get_organ("head") - if(!head) - to_chat(user, "This person doesn't have a head!") - return - if(istype(src, /obj/machinery/cooker/deepfryer)) - C.visible_message("[user] dunks [C]'s face into [src]!", \ - "[user] dunks your face into [src]!") - if(!C.stat) - C.emote("scream") - user.changeNext_move(CLICK_CD_MELEE) - C.apply_damage(25, BURN, "head") //25 fire damage and disfigurement because your face was just deep fried! - head.disfigure("burn") - add_logs(G.assailant, G.affecting, "deep-fried face") - qdel(I) //Removes the grip so the person MIGHT have a small chance to run the fuck away and to prevent rapid dunks. - return - else - to_chat(user, "You can only harm carbon-based creatures this way!") return if(!burns) if(istype(I, /obj/item/weapon/reagent_containers/food/snacks)) @@ -176,6 +146,9 @@ turnoff(I) //qdel(I) +/obj/machinery/cooker/proc/special_attack(obj/item/weapon/grab/G, mob/user) + return 0 + // MAKE SURE TO OVERRIDE THESE ON THE MACHINE IF IT HAS SPECIAL FOOD INTERACTIONS! // FAILURE TO OVERRIDE WILL RESULT IN FAILURE TO PROPERLY HANDLE SPECIAL INTERACTIONS! --FalseIncarnate /obj/machinery/cooker/proc/checkSpecials(obj/item/I) 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 79b89e8dd18..2ff232800b7 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,37 @@ var/obj/item/weapon/reagent_containers/food/snacks/deepfryholder/type = new(get_turf(src)) return type +/obj/machinery/cooker/deepfryer/special_attack(obj/item/weapon/grab/G, mob/user) + if(istype(G.affecting, /mob/living/carbon/human)) +// if(!iscarbon(G.affecting)) +// to_chat(user, "You can only harm carbon-based creatures this way!") +// return 0 +// if(G.affecting.stat == DEAD) +// to_chat(user, "[G.affecting] is dead!") +// return 0 + if(G.state < GRAB_AGGRESSIVE) + to_chat(user, "You need a better grip to do that!") + return 0 + var/mob/living/carbon/human/C = G.affecting + var/obj/item/organ/external/head/head = C.get_organ("head") + if(!head) + to_chat(user, "This person doesn't have a head!") + return 0 + C.visible_message("[user] dunks [C]'s face into [src]!", \ + "[user] dunks your face into [src]!") + if(!C.stat) + C.emote("scream") + user.changeNext_move(CLICK_CD_MELEE) + if(!(head.status & ORGAN_ROBOT)) + C.apply_damage(25, BURN, "head") //25 fire damage and disfigurement because your face was just deep fried! + head.disfigure("burn") + add_logs(G.assailant, G.affecting, "deep-fried face") + qdel(G) //Removes the grip so the person MIGHT have a small chance to run the fuck away and to prevent rapid dunks. + else + to_chat(user, "You can only harm carbon-based creatures this way!") + return 0 + + /obj/machinery/cooker/deepfryer/checkSpecials(obj/item/I) if(!I) return 0 diff --git a/code/modules/food_and_drinks/kitchen_machinery/grill_new.dm b/code/modules/food_and_drinks/kitchen_machinery/grill_new.dm index 8b9ac0cd27c..bbfcbdd47eb 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/grill_new.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/grill_new.dm @@ -43,3 +43,36 @@ for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) E += M.rating efficiency = round((E/2), 1) // There's 2 lasers, so halve the effect on the efficiency to keep it balanced + +/obj/machinery/kitchen_machine/grill/special_attack(obj/item/weapon/grab/G, mob/user) + if(istype(G.affecting, /mob/living/carbon/human)) + if(G.state < GRAB_AGGRESSIVE) + to_chat(user, "You need a better grip to do that!") + return 1 + var/mob/living/carbon/human/C = G.affecting + var/obj/item/organ/external/head/head = C.get_organ("head") + var/obj/item/organ/external/chest/chest = C.get_organ("chest") + var/obj/item/organ/external/arm/l_arm = C.get_organ("l_arm") + var/obj/item/organ/external/arm/right/r_arm = C.get_organ("r_arm") + if(!head) + to_chat(user, "This person doesn't have a head!") + return 1 + C.visible_message("[user] forces [C] onto [src], searing [C]'s upper body!", \ + "[user] forces you onto [src]! It burns!") + if(!C.stat) + C.emote("scream") + user.changeNext_move(CLICK_CD_MELEE) + if(!(head.status & ORGAN_ROBOT)) + C.apply_damage(10, BURN, "head") //30 overall upper body damage because your body was just placed over a hot grill! + if(!(chest.status & ORGAN_ROBOT)) + C.apply_damage(10, BURN, "chest") + if(!(l_arm.status & ORGAN_ROBOT)) + C.apply_damage(5, BURN, "l_arm") + if(!(r_arm.status & ORGAN_ROBOT)) + C.apply_damage(5, BURN, "r_arm") + add_logs(G.assailant, G.affecting, "burns on a grill") + qdel(G) //Removes the grip to prevent rapid sears and give you a chance to run + return 1 + else + to_chat(user, "You can only harm carbon-based creatures this way!") + return 0 \ No newline at end of file diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 226da313493..98b6c10613f 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -155,61 +155,7 @@ return 1 //G.reagents.trans_to(src,G.amount_per_transfer_from_this) else if(istype(O,/obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = O - if(!istype(src, /obj/machinery/kitchen_machine/oven) && !istype(src, /obj/machinery/kitchen_machine/grill)) - to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].") - return 1 - if(istype(G.affecting, /mob/living/carbon/human) && (G.affecting.get_species() != "Machine")) - -// if(!iscarbon(G.affecting)) -// to_chat(user, "You can only harm carbon-based creatures this way!") -// return 1 -// if(G.affecting.stat == DEAD) -// to_chat(user, "[G.affecting] is dead!") -// return 1 - if(G.state < GRAB_AGGRESSIVE) - to_chat(user, "You need a better grip to do that!") - return 1 - var/mob/living/carbon/human/C = G.affecting - var/obj/item/organ/external/head/head = C.get_organ("head") - if(!head) - to_chat(user, "This person doesn't have a head!") - return 1 - if(istype(src, /obj/machinery/kitchen_machine/oven)) - if(G.state < GRAB_AGGRESSIVE) - to_chat(user, "You need a better grip to do that!") - return 1 - C.visible_message("[user] bashes [C]'s head in [src]'s door!", \ - "[user] bashes your head in [src]'s door! It feels rather hot in the oven!") - if(!C.stat) - C.emote("scream") - user.changeNext_move(CLICK_CD_MELEE) - C.apply_damage(5, BURN, "head") //5 fire damage, 15 brute damage, and weakening because your head was just in a hot oven with the door bashing into your neck! - C.apply_damage(15, BRUTE, "head") - C.Weaken(2) - add_logs(G.assailant, G.affecting, "head smashed in oven") - qdel(O) //Removes the grip to prevent rapid bashes. With the weaken, you PROBABLY can't run unless they are slow to grab you again... - return 1 - if(istype(src, /obj/machinery/kitchen_machine/grill)) - if(G.state < GRAB_AGGRESSIVE) - to_chat(user, "You need a better grip to do that!") - return 1 - C.visible_message("[user] forces [C] onto [src], searing [C]'s upper body!", \ - "[user] forces you onto [src]! It burns!") - if(!C.stat) - C.emote("scream") - user.changeNext_move(CLICK_CD_MELEE) - C.apply_damage(10, BURN, "head") //30 overall upper body damage because your body was just placed over a hot grill! - C.apply_damage(10, BURN, "chest") - C.apply_damage(5, BURN, "l_arm") - C.apply_damage(5, BURN, "r_arm") - add_logs(G.assailant, G.affecting, "burns on a grill") - qdel(O) //Removes the grip to prevent rapid sears and give you a chance to run - return 1 - return 1 - else - to_chat(user, "You can only harm carbon-based creatures this way!") - return 1 + return special_attack(O, user) else to_chat(user, "You have no idea what you can cook with this [O].") return 1 @@ -222,6 +168,10 @@ user.set_machine(src) interact(user) +/obj/machinery/kitchen_machine/proc/special_attack(obj/item/weapon/grab/G, mob/user) + to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].") + return 0 + /******************** * Machine Menu * ********************/ diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm b/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm index c709fdf0b5e..0d1afa6672e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm @@ -43,3 +43,29 @@ for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) E += M.rating efficiency = round((E/2), 1) // There's 2 lasers, so halve the effect on the efficiency to keep it balanced + +/obj/machinery/kitchen_machine/oven/special_attack(obj/item/weapon/grab/G, mob/user) + if(istype(G.affecting, /mob/living/carbon/human)) + if(G.state < GRAB_AGGRESSIVE) + to_chat(user, "You need a better grip to do that!") + return 1 + var/mob/living/carbon/human/C = G.affecting + var/obj/item/organ/external/head/head = C.get_organ("head") + if(!head) + to_chat(user, "This person doesn't have a head!") + return 1 + C.visible_message("[user] bashes [C]'s head in [src]'s door!", \ + "[user] bashes your head in [src]'s door! It feels rather hot in the oven!") + if(!C.stat) + C.emote("scream") + user.changeNext_move(CLICK_CD_MELEE) + if(!(head.status & ORGAN_ROBOT)) + C.apply_damage(5, BURN, "head") //5 fire damage, 15 brute damage, and weakening because your head was just in a hot oven with the door bashing into your neck! + C.apply_damage(15, BRUTE, "head") + C.Weaken(2) + add_logs(G.assailant, G.affecting, "head smashed in oven") + qdel(G) //Removes the grip to prevent rapid bashes. With the weaken, you PROBABLY can't run unless they are slow to grab you again... + return 1 + else + to_chat(user, "You can only harm carbon-based creatures this way!") + return 0