mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
[MIRROR] Vended items now go into hand (#1431)
* Vended items now go into hand * Update _vending.dm Co-authored-by: Gandalf <jzo123@hotmail.com> Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
@@ -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, "<span class='notice'>You take [R.name] out of the slot.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>[capitalize(R.name)] falls onto the floor!</span>")
|
||||
//SKYRAT EDIT END
|
||||
if(usr.CanReach(src) && usr.put_in_hands(vended_item))
|
||||
to_chat(usr, "<span class='notice'>You take [R.name] out of the slot.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>[capitalize(R.name)] falls onto the floor!</span>")
|
||||
SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]"))
|
||||
vend_ready = TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user