mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
fixes an EFTPOS runtime if there's no connected account (#20456)
* fixes an EFTPOS runtime if there's no connected account * ryan review
This commit is contained in:
@@ -182,6 +182,9 @@
|
||||
return
|
||||
|
||||
var/datum/money_account/D = GLOB.station_money_database.find_user_account(C.associated_account_number, include_departments = FALSE)
|
||||
if(!D)
|
||||
to_chat(user, "<span class='warning'>Your currently in use card is not connected to a money account.</span>")
|
||||
return
|
||||
//if security level high enough, prompt for pin
|
||||
var/attempt_pin
|
||||
if(D.security_level != ACCOUNT_SECURITY_ID)
|
||||
@@ -189,7 +192,7 @@
|
||||
if(!attempt_pin || !Adjacent(user))
|
||||
return
|
||||
//given the credentials, can the associated account be accessed right now?
|
||||
if(!D || !GLOB.station_money_database.try_authenticate_login(D, attempt_pin, restricted_bypass = FALSE))
|
||||
if(!GLOB.station_money_database.try_authenticate_login(D, attempt_pin, restricted_bypass = FALSE))
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>Unable to access account, insufficient access.</span>")
|
||||
return
|
||||
if(alert("Are you sure you want to pay $[transaction_amount] to: [linked_account.account_name] ", "Confirm transaction", "Yes", "No") != "Yes")
|
||||
|
||||
Reference in New Issue
Block a user