Skip to content

Commit

Permalink
[MIRROR] Oven tray checks for ovens (#1968) (#2874)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: SyncIt21 <[email protected]>
  • Loading branch information
3 people authored Apr 14, 2024
1 parent 8c17f50 commit b049980
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions code/modules/food_and_drinks/machinery/oven.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -253,7 +252,7 @@

if(isnull(item.atom_storage))
return

if(is_right_clicking)
var/obj/item/storage/tray = item

Expand Down

0 comments on commit b049980

Please sign in to comment.