mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Make vending machines stop selling things if vendor account is suspended
This commit is contained in:
@@ -179,7 +179,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if (currently_vending)
|
if (currently_vending && vendor_account && !vendor_account.suspended)
|
||||||
var/paid = 0
|
var/paid = 0
|
||||||
var/handled = 0
|
var/handled = 0
|
||||||
if(istype(W, /obj/item/weapon/card/id))
|
if(istype(W, /obj/item/weapon/card/id))
|
||||||
@@ -493,6 +493,10 @@
|
|||||||
src.vend(R, usr)
|
src.vend(R, usr)
|
||||||
else
|
else
|
||||||
src.currently_vending = R
|
src.currently_vending = R
|
||||||
|
if(!vendor_account || vendor_account.suspended)
|
||||||
|
src.status_message = "This machine is currently unable to process payments due to problems with the associated account."
|
||||||
|
src.status_error = 1
|
||||||
|
else
|
||||||
src.status_message = "Please swipe a card or insert cash to pay for the item."
|
src.status_message = "Please swipe a card or insert cash to pay for the item."
|
||||||
src.status_error = 0
|
src.status_error = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user