Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This reverts commit 839e167.
  • Loading branch information
Tsar-Salat committed Sep 29, 2023
1 parent e7451d6 commit 2eb4bef
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
1 change: 0 additions & 1 deletion code/datums/components/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
RegisterSignal(parent, COMSIG_ITEM_PRE_ATTACK, PROC_REF(preattack_intercept))
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(attack_self))
RegisterSignal(parent, COMSIG_ITEM_PICKUP, PROC_REF(signal_on_pickup))
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(update_actions))

RegisterSignal(parent, COMSIG_MOVABLE_POST_THROW, PROC_REF(close_all))
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
Expand Down
23 changes: 7 additions & 16 deletions code/game/objects/structures/displaycase.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
toggle_lock(user)
else if(open && !showpiece)
insert_showpiece(W, user)
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()
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)
Expand All @@ -188,15 +194,6 @@
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()
Expand Down Expand Up @@ -618,9 +615,3 @@
/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
. = ..()
8 changes: 3 additions & 5 deletions code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
qdel(DG)
glasses++
to_chat(user, "<span class='notice'>[src] accepts the drinking glass, sterilizing it.</span>")
else if(IS_EDIBLE(O))
else if(istype(O, /obj/item/reagent_containers/food/snacks))
if(isFull())
to_chat(user, "<span class='warning'>[src] is at full capacity.</span>")
else
var/obj/item/S = O
var/obj/item/reagent_containers/food/snacks/S = O
if(!user.transferItemToLoc(S, src))
return
if(stored_food[sanitize(S.name)])
Expand All @@ -59,13 +59,11 @@
to_chat(user, "<span class='notice'>[src] accepts a sheet of glass.</span>")
else if(istype(O, /obj/item/storage/bag/tray))
var/obj/item/storage/bag/tray/T = O
for(var/obj/item/S in T.contents)
for(var/obj/item/reagent_containers/food/snacks/S in T.contents)
if(isFull())
to_chat(user, "<span class='warning'>[src] is at full capacity.</span>")
break
else
if(!IS_EDIBLE(S))
continue
if(SEND_SIGNAL(T, COMSIG_TRY_STORAGE_TAKE, S, src))
if(stored_food[sanitize(S.name)])
stored_food[sanitize(S.name)]++
Expand Down
4 changes: 1 addition & 3 deletions code/modules/food_and_drinks/kitchen_machinery/microwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@
if(istype(O, /obj/item/storage/bag/tray))
var/obj/item/storage/T = O
var/loaded = 0
for(var/obj/S in T.contents)
if(!IS_EDIBLE(S))
continue
for(var/obj/item/reagent_containers/food/snacks/S in T.contents)
if(ingredients.len >= max_n_of_items)
to_chat(user, "<span class='warning'>\The [src] is full, you can't put anything in!</span>")
return TRUE
Expand Down
4 changes: 1 addition & 3 deletions code/modules/food_and_drinks/kitchen_machinery/processor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@
if(istype(O, /obj/item/storage/bag/tray))
var/obj/item/storage/T = O
var/loaded = 0
for(var/obj/S in T.contents)
if(!IS_EDIBLE(S))
continue
for(var/obj/item/reagent_containers/food/snacks/S in T.contents)
var/datum/food_processor_process/P = select_recipe(S)
if(P)
if(SEND_SIGNAL(T, COMSIG_TRY_STORAGE_TAKE, S, src))
Expand Down

0 comments on commit 2eb4bef

Please sign in to comment.