mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Food processors and microwaves now respect food trays (#54927)
Really it's a bandaid as it would be better to wait until the refactor is done, but it turned out to be a rather easy fix. Food trays may now once again mass insert both new and old food into the microwaves and food processors. Prevents any manual handing when cooking large quantities of food at once. Also, you get the switch gathering mode button when being given the serving tray again.
This commit is contained in:
@@ -146,13 +146,7 @@
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else if(open && !showpiece)
|
||||
if(showpiece_type && !istype(W, showpiece_type))
|
||||
to_chat(user, "<span class='notice'>This doesn't belong in this kind of display.</span>")
|
||||
return TRUE
|
||||
if(user.transferItemToLoc(W, src))
|
||||
showpiece = W
|
||||
to_chat(user, "<span class='notice'>You put [W] on display.</span>")
|
||||
update_icon()
|
||||
insert_showpiece(W, user)
|
||||
else if(glass_fix && broken && istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(G.get_amount() < 2)
|
||||
@@ -167,6 +161,15 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/proc/insert_showpiece(obj/item/wack, mob/user)
|
||||
if(showpiece_type && !istype(wack, showpiece_type))
|
||||
to_chat(user, "<span class='notice'>This doesn't belong in this kind of display.</span>")
|
||||
return TRUE
|
||||
if(user.transferItemToLoc(wack, src))
|
||||
showpiece = wack
|
||||
to_chat(user, "<span class='notice'>You put [wack] on display.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/proc/toggle_lock(mob/user)
|
||||
open = !open
|
||||
update_icon()
|
||||
@@ -384,7 +387,6 @@
|
||||
density = FALSE
|
||||
max_integrity = 100
|
||||
req_access = null
|
||||
showpiece_type = /obj/item/reagent_containers/food
|
||||
alert = FALSE //No, we're not calling the fire department because someone stole your cookie.
|
||||
glass_fix = FALSE //Fixable with tools instead.
|
||||
///The price of the item being sold. Altered by grab intent ID use.
|
||||
@@ -577,3 +579,9 @@
|
||||
/obj/structure/displaycase/forsale/kitchen
|
||||
desc = "A display case with an ID-card swiper. Use your ID to purchase the contents. Meant for the bartender and chef."
|
||||
req_one_access = list(ACCESS_KITCHEN, ACCESS_BAR)
|
||||
|
||||
/obj/structure/displaycase/forsale/insert_showpiece(obj/item/wack, mob/user)
|
||||
if(!IS_EDIBLE(wack))
|
||||
to_chat(user, "<span class='notice'>\The [src] smartly rejects [wack], as it only accepts food and drinks.</span>")
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user