From 39a712e7f83a17f2b30920f60cac646018c2d00a Mon Sep 17 00:00:00 2001 From: FlitchTime Date: Wed, 11 Dec 2024 02:48:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D1=83=D1=85=D0=BD=D1=8F=20=D0=B8=20?= =?UTF-8?q?=D0=BA=D1=81=D0=B5=D0=BD=D0=BE=D0=B1=D0=B8=D0=BE=20=D0=B1=D1=83?= =?UTF-8?q?=D0=B4=D1=83=D1=82=20=D0=BC=D0=BD=D0=B5=20=D1=81=D0=BE=D1=81?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D1=82?= =?UTF-8?q?=D0=B0=D0=BA=D0=BE=D0=B3=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kitchen_machinery/kitchen_machine.dm | 23 +++++++++++++++++-- .../chemistry/machinery/reagentgrinder.dm | 23 ++++++++++++++++--- 2 files changed, 41 insertions(+), 5 deletions(-) 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 89ca589b959..969ab56268d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -147,6 +147,25 @@ to_chat(user, span_warning("You have no idea how to cook with [I].")) return ATTACK_CHAIN_PROCEED|ATTACK_CHAIN_NO_AFTERATTACK +/obj/machinery/kitchen_machine/AltClick(mob/user) + var/mob/living/carbon/human/human = user + if(!istype(human)) + return + if(operating) + return + + add_fingerprint(user) + cook() + +/obj/machinery/kitchen_machine/CtrlShiftClick(mob/user) + var/mob/living/carbon/human/human = user + if(!istype(human)) + return + if(operating) + return + + add_fingerprint(user) + dispose() /obj/machinery/kitchen_machine/screwdriver_act(mob/living/user, obj/item/I) . = TRUE @@ -322,7 +341,7 @@ * Machine Menu Handling/Cooking * ************************************/ -/obj/machinery/kitchen_machine/proc/cook() +/obj/machinery/kitchen_machine/proc/cook(mob/user) if(stat & (NOPOWER|BROKEN)) return start() @@ -458,7 +477,7 @@ update_icon(UPDATE_ICON_STATE) updateUsrDialog() -/obj/machinery/kitchen_machine/proc/dispose() +/obj/machinery/kitchen_machine/proc/dispose(mob/user) for(var/obj/O in contents) O.forceMove(loc) if(reagents.total_volume) diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 3ca90cc829d..1a6232232c0 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -162,7 +162,6 @@ return default_unfasten_wrench(user, I) - /obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params) if(user.a_intent == INTENT_HARM) return ..() @@ -232,7 +231,25 @@ updateUsrDialog() return ATTACK_CHAIN_BLOCKED_ALL +/obj/machinery/reagentgrinder/AltClick(mob/user) + var/mob/living/carbon/human/human = user + if(!istype(human)) + return + if(operating) + return + + add_fingerprint(user) + grind(user) +/obj/machinery/reagentgrinder/CtrlShiftClick(mob/user) + var/mob/living/carbon/human/human = user + if(!istype(human)) + return + if(operating) + return + + add_fingerprint(user) + detach(user) /obj/machinery/reagentgrinder/attack_ai(mob/user) return FALSE @@ -307,7 +324,7 @@ if ("detach") detach() -/obj/machinery/reagentgrinder/proc/detach() +/obj/machinery/reagentgrinder/proc/detach(mob/user) if (usr.stat != 0) return @@ -409,7 +426,7 @@ remove_object(O) -/obj/machinery/reagentgrinder/proc/grind() +/obj/machinery/reagentgrinder/proc/grind(mob/user) power_change() if(stat & (NOPOWER|BROKEN))