[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 <adrermail@gmail.com>
This commit is contained in:
Chap
2024-11-11 16:14:00 +01:00
committed by GitHub
parent 192692f06a
commit 6aca80153b
2 changed files with 9 additions and 1 deletions
@@ -86,7 +86,7 @@
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>")
//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, "<span class='warning'>[src] is empty!</span>")
return
@@ -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 *
********************/