Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit b8df4be

Browse files
Fixed #19482 and slight text reformating
1 parent e631f81 commit b8df4be

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

code/modules/food_and_drinks/kitchen_machinery/food_cart.dm

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,23 @@
4646
data["mixerDrinks"] = list()
4747
data["storage"] = list()
4848

49+
//Make sure food_ui_list has desired contents
50+
//This, combined with the find_amount() bellow, allow parmesan cheese to show in the UI after maturing
51+
for(var/obj/list_element in contents)
52+
//Only check food items
53+
if(istype(list_element, /obj/item/reagent_containers/food))
54+
//Add to list if not already in it
55+
if(!LAZYFIND(food_ui_list, list_element.type))
56+
LAZYADD(food_ui_list, list_element.type)
57+
4958

5059
//Loop through food list for data to send to food tab
5160
for(var/item_detail in food_ui_list)
61+
//If none are found in contents, remove from list and move on to next element
62+
if(find_amount(item_detail) == 0)
63+
LAZYREMOVE(food_ui_list, item_detail)
64+
continue
65+
5266
//Create needed list and variable for geting data for UI
5367
var/list/details = list()
5468
var/obj/item/reagent_containers/food/item = new item_detail
@@ -195,7 +209,7 @@
195209
//Drop it on the floor and then move it into the user's hands
196210
dispensed_item.forceMove(loc)
197211
user.put_in_hands(dispensed_item)
198-
user.visible_message(span_notice("[user] dispenses [ui_item.name] from [src]."), span_notice("You dispense [ui_item.name] from [src]."))
212+
user.visible_message(span_notice("[user] dispenses [dispensed_item.name] from [src]."), span_notice("You dispense [dispensed_item.name] from [src]."))
199213
playsound(src, dispense_sound, 25, TRUE, extrarange = -3)
200214
//If the last one was dispenced, remove from UI
201215
if(find_amount(ui_item) == 0)

0 commit comments

Comments
 (0)