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

Commit 588ba51

Browse files
Deletes unneeded instances
1 parent d1b8fc2 commit 588ba51

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
details["selected_item"] = selected_cone
8888
data["cones"] += list(details)
8989

90+
//Delete item instance
91+
qdel(item)
92+
9093
//Loop through children of /datum/info_tab/icecream_vat for data to send to info tab
9194
for(var/info_detail in subtypesof(/datum/info_tab/icecream_vat))
9295

@@ -101,6 +104,9 @@
101104
//Add info to data
102105
data["info_tab"] += list(details)
103106

107+
//Delete item instance
108+
qdel(item)
109+
104110
//Get content and capacity data
105111
data["contents_length"] = contents.len
106112
data["storage_capacity"] = storage_capacity
@@ -155,13 +161,17 @@
155161
else
156162
var/obj/item/reagent_containers/food/snacks/examine_cone = new selected_cone
157163
. += span_notice("<b>Alt Click</b> to dispense [examine_cone.name].")
164+
//Delete item instance
165+
qdel(examine_cone)
158166

159167
//Selected scoops
160168
if(selected_scoop == null)
161169
. += span_notice("No ice cream scoop currently selected.")
162170
else
163171
var/obj/item/reagent_containers/food/snacks/examine_scoop = new selected_scoop
164172
. += span_notice("[examine_scoop.name] is currently selected.")
173+
//Delete item instance
174+
qdel(examine_scoop)
165175

166176
//Scooping cone instruction
167177
. += span_notice("<b>Right Click</b> to add a scoop to a cone.")
@@ -240,6 +250,9 @@
240250
//For Alt click and because UI buttons are slow to disable themselves
241251
user.balloon_alert(user, "All out!")
242252

253+
//Delete item instance
254+
qdel(ui_item)
255+
243256
/obj/machinery/icecream_vat/proc/select_item(received_item, mob/user = usr)
244257

245258
//Make a variable for checking the type of the selected item
@@ -273,6 +286,9 @@
273286
else
274287
user.balloon_alert(user, "All out!")
275288

289+
//Delete item instance
290+
qdel(received_item)
291+
276292
/obj/machinery/icecream_vat/proc/last_index(obj/item/search_item)
277293

278294
var/obj/item/reagent_containers/food/snacks/item_index = null

0 commit comments

Comments
 (0)