From dcb24a61375f509be4ca85b9354763eb84eb2dff Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 23 Oct 2020 12:49:52 +0200 Subject: [PATCH] [MIRROR] Vended items now go into hand (#1431) * Vended items now go into hand * Update _vending.dm Co-authored-by: Gandalf Co-authored-by: Azarak --- code/modules/vending/_vending.dm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index b34c384278b..0600c7f110f 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -866,16 +866,12 @@ GLOBAL_LIST_EMPTY(vending_products) if(icon_vend) //Show the vending animation if needed flick(icon_vend,src) playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3) - var/vended = new R.product_path(get_turf(src))//SKYRAT EDIT CHANGE - QOL - ORIGINAL: new R.product_path(get_turf(src)) + var/obj/item/vended_item = new R.product_path(get_turf(src)) R.amount-- - //SKYRAT EDIT ADDITION BEGIN - QOL - if(istype(vended, /obj/item)) - var/obj/item/V = vended - if(usr.CanReach(src) && usr.put_in_hands(V)) - to_chat(usr, "You take [R.name] out of the slot.") - else - to_chat(usr, "[capitalize(R.name)] falls onto the floor!") - //SKYRAT EDIT END + if(usr.CanReach(src) && usr.put_in_hands(vended_item)) + to_chat(usr, "You take [R.name] out of the slot.") + else + to_chat(usr, "[capitalize(R.name)] falls onto the floor!") SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]")) vend_ready = TRUE