|
221 | 221 |
|
222 | 222 | return amount |
223 | 223 |
|
224 | | -/obj/machinery/icecream_vat/proc/dispense_item(obj/item/reagent_containers/food/snacks/received_item, mob/user = usr) |
| 224 | +/obj/machinery/icecream_vat/proc/dispense_item(obj/item/reagent_containers/food/snacks/received_item_type, mob/user = usr) |
225 | 225 | //If the vat has some of the desired item, dispense it |
226 | | - if(find_amount(received_item) > 0) |
| 226 | + if(find_amount(received_item_type) > 0) |
227 | 227 | //Select the last(most recent) of desired item |
228 | | - var/obj/item/reagent_containers/food/snacks/dispensed_item = LAZYACCESS(contents, last_index(received_item)) |
| 228 | + var/obj/item/reagent_containers/food/snacks/dispensed_item = LAZYACCESS(contents, last_index(received_item_type)) |
229 | 229 | //Drop it on the floor and then move it into the user's hands |
230 | 230 | dispensed_item.forceMove(loc) |
231 | 231 | user.put_in_hands(dispensed_item) |
232 | | - user.visible_message(span_notice("[user] dispenses [received_item::name] from [src]."), span_notice("You dispense [received_item::name] from [src].")) |
| 232 | + user.visible_message(span_notice("[user] dispenses [received_item_type::name] from [src]."), span_notice("You dispense [received_item_type::name] from [src].")) |
233 | 233 | playsound(src, dispense_sound, 25, TRUE, extrarange = -3) |
234 | 234 | else |
235 | 235 | //For Alt click and because UI buttons are slow to disable themselves |
236 | 236 | user.balloon_alert(user, "All out!") |
237 | 237 |
|
238 | 238 | /obj/machinery/icecream_vat/proc/select_item(obj/item/reagent_containers/food/snacks/received_item_type, mob/user = usr) |
239 | 239 | //Deselecting |
240 | | - if(istype(received_item_type, /obj/item/reagent_containers/food/snacks/ice_cream_cone)) |
| 240 | + if(ispath(received_item_type, /obj/item/reagent_containers/food/snacks/ice_cream_cone)) |
241 | 241 | if(selected_cone_type == received_item_type) |
242 | 242 | user.visible_message(span_notice("[user] deselects [received_item_type::name] from [src]."), span_notice("You deselect [received_item_type::name] from [src].")) |
243 | 243 | selected_cone_type = null |
|
253 | 253 | //Selecting |
254 | 254 | if(find_amount(received_item_type) > 0) |
255 | 255 | //Set item to selected based on its type |
256 | | - if(istype(received_item_type, /obj/item/reagent_containers/food/snacks/ice_cream_cone)) |
| 256 | + if(ispath(received_item_type, /obj/item/reagent_containers/food/snacks/ice_cream_cone)) |
257 | 257 | selected_cone_type = received_item_type |
258 | 258 | else |
259 | 259 | selected_scoop_type = received_item_type |
|
0 commit comments