From 6aca80153be91950d9d6042d47bf2b7bde92a92b Mon Sep 17 00:00:00 2001 From: Chap Date: Mon, 11 Nov 2024 16:14:00 +0100 Subject: [PATCH] [FIX] Kitchen machines no longer accept reagents while running (#27288) * Cannot add reagents to an machine that is on * Check if target is refillable, not if it's drainable --------- Co-authored-by: Adrer --- code/modules/food_and_drinks/food/condiment.dm | 2 +- .../food_and_drinks/kitchen_machinery/kitchen_machine.dm | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index d48707468de..fc68d964b4e 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -86,7 +86,7 @@ to_chat(user, "You fill [src] with [trans] units of the contents of [target].") //Something like a glass or a food item. Player probably wants to transfer TO it. - else if(target.is_drainable() || istype(target, /obj/item/food)) + else if(target.is_refillable() || istype(target, /obj/item/food)) if(!reagents.total_volume) to_chat(user, "[src] is empty!") return 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 965e9a95911..90274d1ac15 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -197,6 +197,14 @@ /obj/machinery/kitchen_machine/proc/special_attack_shove(mob/living/target, mob/living/attacker) return FALSE +/** + * Check if the machine is running when trying to add reagents to it. + */ +/obj/machinery/kitchen_machine/is_refillable() + if(operating) + return FALSE + . = ..() + /******************** * Machine Menu * ********************/