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

Commit 7d9b33f

Browse files
Switched some instancing with colons
1 parent 588ba51 commit 7d9b33f

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,14 @@
9595

9696
//Create needed list and variable for geting data for UI
9797
var/list/details = list()
98-
var/datum/info_tab/icecream_vat/item = new info_detail
9998

10099
//Get info from children
101-
details["section_title"] = item.section
102-
details["section_text"] = item.section_text
100+
details["section_title"] = info_detail:section
101+
details["section_text"] = info_detail:section_text
103102

104103
//Add info to data
105104
data["info_tab"] += list(details)
106105

107-
//Delete item instance
108-
qdel(item)
109-
110106
//Get content and capacity data
111107
data["contents_length"] = contents.len
112108
data["storage_capacity"] = storage_capacity
@@ -159,19 +155,13 @@
159155
if(selected_cone == null)
160156
. += span_notice("You can <b>Alt Click</b> to dispense a cone once one is selected.")
161157
else
162-
var/obj/item/reagent_containers/food/snacks/examine_cone = new selected_cone
163-
. += span_notice("<b>Alt Click</b> to dispense [examine_cone.name].")
164-
//Delete item instance
165-
qdel(examine_cone)
158+
. += span_notice("<b>Alt Click</b> to dispense [selected_cone:name].")
166159

167160
//Selected scoops
168161
if(selected_scoop == null)
169162
. += span_notice("No ice cream scoop currently selected.")
170163
else
171-
var/obj/item/reagent_containers/food/snacks/examine_scoop = new selected_scoop
172-
. += span_notice("[examine_scoop.name] is currently selected.")
173-
//Delete item instance
174-
qdel(examine_scoop)
164+
. += span_notice("[selected_scoop:name] is currently selected.")
175165

176166
//Scooping cone instruction
177167
. += span_notice("<b>Right Click</b> to add a scoop to a cone.")
@@ -244,7 +234,7 @@
244234
//Drop it on the floor and then move it into the user's hands
245235
dispensed_item.forceMove(loc)
246236
user.put_in_hands(dispensed_item)
247-
user.visible_message(span_notice("[user] dispenses [ui_item.name] from [src]."), span_notice("You dispense [ui_item.name] from [src]."))
237+
user.visible_message(span_notice("[user] dispenses [received_item:name] from [src]."), span_notice("You dispense [received_item:name] from [src]."))
248238
playsound(src, dispense_sound, 25, TRUE, extrarange = -3)
249239
else
250240
//For Alt click and because UI buttons are slow to disable themselves
@@ -261,13 +251,13 @@
261251
//Deselecting
262252
if(istype(ui_item, /obj/item/reagent_containers/food/snacks/ice_cream_cone))
263253
if(selected_cone == ui_item.type)
264-
user.visible_message(span_notice("[user] deselects [ui_item.name] from [src]."), span_notice("You deselect [ui_item.name] from [src]."))
254+
user.visible_message(span_notice("[user] deselects [received_item:name] from [src]."), span_notice("You deselect [received_item:name] from [src]."))
265255
selected_cone = null
266256
playsound(src, select_sound, 25, TRUE, extrarange = -3)
267257

268258
return
269259
else if(selected_scoop == ui_item.type)
270-
user.visible_message(span_notice("[user] deselects [ui_item.name] from [src]."), span_notice("You deselect [ui_item.name] from [src]."))
260+
user.visible_message(span_notice("[user] deselects [received_item:name] from [src]."), span_notice("You deselect [received_item:name] from [src]."))
271261
selected_scoop = null
272262
playsound(src, select_sound, 25, TRUE, extrarange = -3)
273263

@@ -281,7 +271,7 @@
281271
else
282272
selected_scoop = ui_item.type
283273
playsound(src, select_sound, 25, TRUE, extrarange = -3)
284-
user.visible_message(span_notice("[user] sets [src] to dispense [ui_item.name]s."), span_notice("You set [src] to dispense [ui_item.name]s."))
274+
user.visible_message(span_notice("[user] sets [src] to dispense [received_item:name]s."), span_notice("You set [src] to dispense [received_item:name]s."))
285275
//Prevent them from selecting items that the vat does not have
286276
else
287277
user.balloon_alert(user, "All out!")

0 commit comments

Comments
 (0)