diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 9a18480920..410952397d 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -436,12 +436,16 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C return if(coin && coin.string_attached) if(prob(50)) - if(usr.put_in_hands(coin)) - to_chat(usr, "You successfully pull [coin] out before [src] could swallow it.") - coin = null + if(usr.CanReach(src)) + if(usr.put_in_hands(coin)) + to_chat(usr, "You successfully pull [coin] out before [src] could swallow it.") + coin = null + else + to_chat(usr, "You couldn't pull [coin] out because your hands are full!") + QDEL_NULL(coin) else - to_chat(usr, "You couldn't pull [coin] out because your hands are full!") - QDEL_NULL(coin) + to_chat(usr, "You successfully pull [coin] out of [src] to the floor.") + coin = null else to_chat(usr, "You weren't able to pull [coin] out fast enough, the machine ate it, string and all!") QDEL_NULL(coin) @@ -469,10 +473,13 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C if(icon_vend) //Show the vending animation if needed flick(icon_vend,src) var/vended = new R.product_path(get_turf(src)) - if(usr.put_in_hands(vended)) - to_chat(usr, "You take [R.name] out of the slot.") + if(usr.CanReach(src)) + if(usr.put_in_hands(vended)) + to_chat(usr, "You take [R.name] out of the slot.") + else + to_chat(usr, "[capitalize(R.name)] falls onto the floor!") else - to_chat(usr, "[capitalize(R.name)] falls onto the floor!") + 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 = 1