Re-added the account info paper on creating a new account. (#24588)

* Re-added the account info paper on creating a new account.

* Review suggestions.
This commit is contained in:
Charlie Nolan
2024-03-20 20:16:52 +00:00
committed by GitHub
parent cb7b71a03d
commit d1c77ea8fb
@@ -136,9 +136,40 @@
var/account_name = params["holder_name"]
if(!account_name)
return
GLOB.station_money_database.create_account(account_name, 0, ACCOUNT_SECURITY_ID, name, supress_log = FALSE)
var/datum/money_account/account = GLOB.station_money_database.create_account(account_name, 0, ACCOUNT_SECURITY_ID, name, supress_log = FALSE)
print_new_account_info(account)
current_page = AUT_ACCLST
/obj/machinery/computer/account_database/proc/print_new_account_info(datum/money_account/account)
//create a sealed package containing the account details
var/obj/item/smallDelivery/package = new /obj/item/smallDelivery(loc)
var/obj/item/paper/printout = new /obj/item/paper(package)
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, TRUE)
package.wrapped = printout
printout.name = "Account information: [account.account_name]"
var/overseer = "Unknown"
var/datum/ui_login/L = ui_login_get()
if(L.id)
overseer = L.id.registered_name
printout.info = {"<b>Account details (confidential)</b><br><hr><br>
<i>Account holder:</i> [account.account_name]<br>
<i>Account number:</i> [account.account_number]<br>
<i>Account PIN:</i> [account.account_pin]<br>
<i>Starting balance:</i> $[account.credit_balance]<br>
<i>Created at:</i> [GLOB.current_date_string], [station_time_timestamp()]<br><br>
<i>Authorised NT officer overseeing creation:</i> [overseer]<br>"}
//stamp the paper (icon only)
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.icon_state = "paper_stamp-cent"
if(!printout.stamped)
printout.stamped = new
printout.stamped += /obj/item/stamp
printout.stamp_overlays += stampoverlay
printout.stamps += "<hr><i>This paper has been stamped by the Accounts Database.</i>"
/obj/machinery/computer/account_database/proc/clear_viewed_account()
UnregisterSignal(detailed_account_view, COMSIG_PARENT_QDELETING)
detailed_account_view = null