From a554c8a74cbb18447b5d168bfd1d68df711c4fac Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 13 Dec 2021 01:34:15 +0100 Subject: [PATCH] [MIRROR] Minor improvements and fixes to the access report paper from the Plexagon computer program [MDB IGNORE] (#10044) * Minor improvements and fixes to the access report paper from the Plexagon computer program (#63262) * Minor improvements and fixes to the access report paper from the Plexagon computer program Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> --- .../file_system/programs/card.dm | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/code/modules/modular_computers/file_system/programs/card.dm b/code/modules/modular_computers/file_system/programs/card.dm index ccd9382006e..10f2f0cc94f 100644 --- a/code/modules/modular_computers/file_system/programs/card.dm +++ b/code/modules/modular_computers/file_system/programs/card.dm @@ -15,6 +15,8 @@ /// If TRUE, this program is authenticated with limited departmental access. var/minor = FALSE /// The name/assignment combo of the ID card used to authenticate. + var/authenticated_card + /// The name of the registered user, related to `authenticated_card`. var/authenticated_user /// The regions this program has access to based on the authenticated ID. var/list/region_access = list() @@ -46,7 +48,8 @@ // If the program isn't locked to a specific department or is_centcom and we have ACCESS_CHANGE_IDS in our auth card, we're not minor. if((!target_dept || is_centcom) && (ACCESS_CHANGE_IDS in id_card.access)) minor = FALSE - authenticated_user = "[id_card.name]" + authenticated_card = "[id_card.name]" + authenticated_user = id_card.registered_name ? id_card.registered_name : "Unknown" job_templates = is_centcom ? SSid_access.centcom_job_templates.Copy() : SSid_access.station_job_templates.Copy() valid_access = is_centcom ? SSid_access.get_region_access_list(list(REGION_CENTCOM)) : SSid_access.get_region_access_list(list(REGION_ALL_STATION)) update_static_data(user) @@ -64,7 +67,7 @@ if(length(region_access)) minor = TRUE valid_access |= SSid_access.get_region_access_list(region_access) - authenticated_user = "[id_card.name] \[LIMITED ACCESS\]" + authenticated_card = "[id_card.name] \[LIMITED ACCESS\]" update_static_data(user) return TRUE @@ -100,6 +103,7 @@ return TRUE // Log out. if("PRG_logout") + authenticated_card = null authenticated_user = null playsound(computer, 'sound/machines/terminal_off.ogg', 50, FALSE) return TRUE @@ -107,10 +111,10 @@ if("PRG_print") if(!computer || !printer) return TRUE - if(!authenticated_user) + if(!authenticated_card) return TRUE var/contents = {"