From b0499803f91f66380e58b4560cdb987a4f331410 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sun, 14 Apr 2024 22:05:17 +0300 Subject: [PATCH] [MIRROR] Oven tray checks for ovens (#1968) (#2874) * Oven tray checks for ovens (#82615) ## About The Pull Request - Fixes #82610 Only oven trays have this proc not serving trays or other stuff ![Screenshot (408)](https://github.com/tgstation/tgstation/assets/110812394/4867cc14-9df3-4398-9d2d-f8e38b5f0da9) Also oven trays have a null atom storage which prevents it from being put back in the oven after taking it out. So we remove that check ## Changelog :cl: fix: you can put back the oven tray after you take it out fix: only oven trays are allowed in ovens preventing baked food runtimes /:cl: * Oven tray checks for ovens --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> --- code/modules/food_and_drinks/machinery/oven.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/modules/food_and_drinks/machinery/oven.dm b/code/modules/food_and_drinks/machinery/oven.dm index da0c75824ca..85462737745 100644 --- a/code/modules/food_and_drinks/machinery/oven.dm +++ b/code/modules/food_and_drinks/machinery/oven.dm @@ -99,11 +99,10 @@ update_appearance() use_energy(active_power_usage) - /obj/machinery/oven/attackby(obj/item/item, mob/user, params) - if(!open || used_tray || !item.atom_storage) + if(!open || used_tray || !istype(item, /obj/item/plate/oven_tray)) return ..() - + if(user.transferItemToLoc(item, src, silent = FALSE)) to_chat(user, span_notice("You put [item] in [src].")) add_tray_to_oven(item, user) @@ -253,7 +252,7 @@ if(isnull(item.atom_storage)) return - + if(is_right_clicking) var/obj/item/storage/tray = item