vend_ready can get stuck at 0 on vendors

Locked
User avatar
mullvad
Registered user
Posts: 63
Joined: 12 Dec 2016, 06:40
Byond: mullvad

vend_ready can get stuck at 0 on vendors

Post by mullvad » 13 Dec 2016, 17:27

Bug Description:

Code: Select all

/obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user)
Does not properly re-set the vend_ready variable when a coin purchase is being made without a coin.

Code: Select all

	src.vend_ready = 0 //One thing at a time!!

	if (R in coin_records)
		if(!coin)
			user << "\blue You need to insert a coin to get this item."
			return
This can be resolved by ensuring vend_ready is always set back to 1.


Steps to reproduce:
1. Open vendor.
2. Insert coin.
3. Remove coin.
4. Press vend on coin item.
5. You need to insert a coin to get this item
6. Congratz! Vendor is now stuck.

User avatar
phil235
Registered user
Posts: 589
Joined: 29 Mar 2017, 20:29
Byond: phil235

Re: vend_ready can get stuck at 0 on vendors

Post by phil235 » 21 May 2017, 19:51

Fixed

Locked