Adds better use feedback to Nanobank and Pin Changing (#20084)

* guh

* Update code/modules/economy/economy_machinery/account_terminal.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
Ryan
2023-01-13 16:27:43 +01:00
committed by GitHub
co-authored by Henri215
parent 428ece899f
commit 748405409d
5 changed files with 50 additions and 5 deletions
+7 -1
View File
@@ -151,9 +151,15 @@
var/new_sec_level = clamp(text2num(params["new_security_level"]), ACCOUNT_SECURITY_ID, ACCOUNT_SECURITY_PIN)
if(!new_sec_level)
return
var/attempt_pin = input_account_pin(user)
var/attempt_pin = 0
if(user_account.security_level >= ACCOUNT_SECURITY_PIN)
attempt_pin = input_account_pin(user)
if(account_database.try_authenticate_login(user_account, attempt_pin, FALSE, FALSE, FALSE))
user_account.security_level = new_sec_level
to_chat(user, "<span class='notice'>Nanobank: account security set to [new_sec_level == ACCOUNT_SECURITY_ID ? "*Account Number Only*" : "*Require Pin Entry*"]</span>")
else
to_chat(user, "<span class='warning'>Authentification Failure: incorrect pin.</span>")
if("toggle_member_approval")
for(var/datum/station_department/department as anything in SSjobs.station_departments)
if(department.department_account == user_account)