|
95 | 95 |
|
96 | 96 | //Create needed list and variable for geting data for UI |
97 | 97 | var/list/details = list() |
98 | | - var/datum/info_tab/icecream_vat/item = new info_detail |
99 | 98 |
|
100 | 99 | //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 |
103 | 102 |
|
104 | 103 | //Add info to data |
105 | 104 | data["info_tab"] += list(details) |
106 | 105 |
|
107 | | - //Delete item instance |
108 | | - qdel(item) |
109 | | - |
110 | 106 | //Get content and capacity data |
111 | 107 | data["contents_length"] = contents.len |
112 | 108 | data["storage_capacity"] = storage_capacity |
|
159 | 155 | if(selected_cone == null) |
160 | 156 | . += span_notice("You can <b>Alt Click</b> to dispense a cone once one is selected.") |
161 | 157 | 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].") |
166 | 159 |
|
167 | 160 | //Selected scoops |
168 | 161 | if(selected_scoop == null) |
169 | 162 | . += span_notice("No ice cream scoop currently selected.") |
170 | 163 | 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.") |
175 | 165 |
|
176 | 166 | //Scooping cone instruction |
177 | 167 | . += span_notice("<b>Right Click</b> to add a scoop to a cone.") |
|
244 | 234 | //Drop it on the floor and then move it into the user's hands |
245 | 235 | dispensed_item.forceMove(loc) |
246 | 236 | 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].")) |
248 | 238 | playsound(src, dispense_sound, 25, TRUE, extrarange = -3) |
249 | 239 | else |
250 | 240 | //For Alt click and because UI buttons are slow to disable themselves |
|
261 | 251 | //Deselecting |
262 | 252 | if(istype(ui_item, /obj/item/reagent_containers/food/snacks/ice_cream_cone)) |
263 | 253 | 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].")) |
265 | 255 | selected_cone = null |
266 | 256 | playsound(src, select_sound, 25, TRUE, extrarange = -3) |
267 | 257 |
|
268 | 258 | return |
269 | 259 | 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].")) |
271 | 261 | selected_scoop = null |
272 | 262 | playsound(src, select_sound, 25, TRUE, extrarange = -3) |
273 | 263 |
|
|
281 | 271 | else |
282 | 272 | selected_scoop = ui_item.type |
283 | 273 | 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.")) |
285 | 275 | //Prevent them from selecting items that the vat does not have |
286 | 276 | else |
287 | 277 | user.balloon_alert(user, "All out!") |
|
0 commit comments