Vending machines don't vend on suspended accounts

This commit is contained in:
Hubblenaut
2014-07-20 18:38:08 +02:00
parent 14b3c87aef
commit c62e38b4cd

View File

@@ -189,16 +189,19 @@
visible_message("<span class='info'>[usr] swipes a card through [src].</span>") visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
var/datum/money_account/CH = get_account(C.associated_account_number) var/datum/money_account/CH = get_account(C.associated_account_number)
if (CH) // Only proceed if card contains proper account number. if (CH) // Only proceed if card contains proper account number.
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) if(!CH.suspended)
if(vendor_account) if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num if(vendor_account)
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2) var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
transfer_and_vend(D) var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
transfer_and_vend(D)
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>" //Just Vend it.
transfer_and_vend(CH)
else else
//Just Vend it. usr << "\icon[src]<span class='warning'>Connected account has been suspended.</span>"
transfer_and_vend(CH)
else else
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>" usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"