Vending machine dispenses into hand [NON-MODULAR] (#1362)

* Update _vending.dm

* Update _vending.dm

* Update bags.dm

* Update _vending.dm
This commit is contained in:
Gandalf
2020-10-19 09:47:53 +02:00
committed by GitHub
parent 8a1c4071af
commit 2b4367093b
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@
inhand_icon_state = "trashbag"
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
slot_flags = null
slot_flags = ITEM_SLOT_BELT //SKYRAT EDIT CHANGE - QOL - ORIGINAL: none
var/insertable = TRUE
/obj/item/storage/bag/trash/ComponentInitialize()
+9 -1
View File
@@ -866,8 +866,16 @@ 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)
new R.product_path(get_turf(src))
var/vended = new R.product_path(get_turf(src))//SKYRAT EDIT CHANGE - QOL - ORIGINAL: 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
SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]"))
vend_ready = TRUE