Address AA 2

This commit is contained in:
mochi
2020-09-24 11:32:17 +02:00
parent aa8e113dec
commit dc50cecef3
7 changed files with 39 additions and 46 deletions
+2 -8
View File
@@ -278,13 +278,11 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
G.fields["sex"] = capitalize(H.gender)
G.fields["species"] = H.dna.species.name
G.fields["photo"] = get_id_photo(H)
G.fields["photo-south"] = "'data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = SOUTH))]'"
G.fields["photo-west"] = "'data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = WEST))]'"
G.fields["photo-south"] = "data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = SOUTH))]"
G.fields["photo-west"] = "data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = WEST))]"
if(H.gen_record && !jobban_isbanned(H, "Records"))
G.fields["record"] = H.gen_record
G.fields["notes"] = H.gen_record
else
G.fields["record"] = "No notes found."
G.fields["notes"] = "No notes found."
general += G
@@ -303,10 +301,8 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
if(H.med_record && !jobban_isbanned(H, "Records"))
M.fields["record"] = H.med_record
M.fields["notes"] = H.med_record
else
M.fields["record"] = "No notes found."
M.fields["notes"] = "No notes found."
medical += M
@@ -321,10 +317,8 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["notes"] = "No notes."
if(H.sec_record && !jobban_isbanned(H, "Records"))
S.fields["record"] = H.sec_record
S.fields["notes"] = H.sec_record
else
S.fields["record"] = "No notes found."
S.fields["notes"] = "No notes found."
LAZYINITLIST(S.fields["comments"])
security += S
+27 -29
View File
@@ -32,27 +32,28 @@
/obj/machinery/computer/secure_data/Initialize(mapload)
. = ..()
req_one_access = list(ACCESS_SECURITY, ACCESS_FORENSICS_LOCKERS)
field_edit_questions = list(
// General
"name" = "Please input new name:",
"id" = "Please input new ID:",
"sex" = "Please select new sex:",
"age" = "Please input new age:",
"fingerprint" = "Please input new fingerprint hash:",
// Security
"criminal" = "Please select new criminal status:",
"mi_crim" = "Please input new minor crimes:",
"mi_crim_d" = "Please summarize minor crimes:",
"ma_crim" = "Please input new major crimes:",
"ma_crim_d" = "Please summarize major crimes:",
"notes" = "Please input new important notes:",
)
field_edit_choices = list(
// General
"sex" = list("Male", "Female"),
// Security
"criminal" = list(SEC_RECORD_STATUS_NONE, SEC_RECORD_STATUS_ARREST, SEC_RECORD_STATUS_EXECUTE, SEC_RECORD_STATUS_INCARCERATED, SEC_RECORD_STATUS_RELEASED, SEC_RECORD_STATUS_PAROLLED, SEC_RECORD_STATUS_DEMOTE, SEC_RECORD_STATUS_SEARCH, SEC_RECORD_STATUS_MONITOR),
)
if(!field_edit_questions)
field_edit_questions = list(
// General
"name" = "Please input new name:",
"id" = "Please input new ID:",
"sex" = "Please select new sex:",
"age" = "Please input new age:",
"fingerprint" = "Please input new fingerprint hash:",
// Security
"criminal" = "Please select new criminal status:",
"mi_crim" = "Please input new minor crimes:",
"mi_crim_d" = "Please summarize minor crimes:",
"ma_crim" = "Please input new major crimes:",
"ma_crim_d" = "Please summarize major crimes:",
"notes" = "Please input new important notes:",
)
field_edit_choices = list(
// General
"sex" = list("Male", "Female"),
// Security
"criminal" = list(SEC_RECORD_STATUS_NONE, SEC_RECORD_STATUS_ARREST, SEC_RECORD_STATUS_EXECUTE, SEC_RECORD_STATUS_INCARCERATED, SEC_RECORD_STATUS_RELEASED, SEC_RECORD_STATUS_PAROLLED, SEC_RECORD_STATUS_DEMOTE, SEC_RECORD_STATUS_SEARCH, SEC_RECORD_STATUS_MONITOR),
)
/obj/machinery/computer/secure_data/Destroy()
record_general = null
@@ -81,7 +82,7 @@
ui.set_autoupdate(FALSE)
/obj/machinery/computer/secure_data/tgui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
var/data[0]
var/list/data = list()
data["currentPage"] = current_page
data["isPrinting"] = is_printing
tgui_login_data(data, user)
@@ -92,7 +93,7 @@
if(SEC_DATA_R_LIST)
// Prepare the list of security records to associate with the general ones.
// This is not ideal but datacore code sucks and needs to be rewritten.
var/list/sec_records_assoc[0]
var/list/sec_records_assoc = list()
for(var/datum/data/record/S in (GLOB.data_core.security || list()))
sec_records_assoc["[S.fields["name"]]|[S.fields["id"]]"] = S
// List the general records
@@ -118,7 +119,7 @@
SEC_FIELD("Fingerprint", gen_fields["fingerprint"], "fingerprint", TRUE),
SEC_FIELD("Physical Status", gen_fields["p_stat"], null, FALSE),
SEC_FIELD("Mental Status", gen_fields["m_stat"], null, TRUE),
SEC_FIELD("Important Notes", gen_fields["record"], null, FALSE),
SEC_FIELD("Important Notes", gen_fields["notes"], null, FALSE),
)
general["photos"] = list(
gen_fields["photo-south"],
@@ -200,6 +201,7 @@
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
G.fields["notes"] = "No notes."
GLOB.data_core.general += G
record_general = G
record_security = null
@@ -227,7 +229,7 @@
return
if(!record_general)
return
message_admins("[key_name_admin(usr)] has deleted [record_security.fields["name"]]'s general, security and medical records at [ADMIN_COORDJMP(usr)]")
message_admins("[key_name_admin(usr)] has deleted [record_general.fields["name"]]'s general, security and medical records at [ADMIN_COORDJMP(usr)]")
for(var/datum/data/record/M in GLOB.data_core.medical)
if(M.fields["name"] == record_general.fields["name"] && M.fields["id"] == record_general.fields["id"])
qdel(M)
@@ -481,10 +483,6 @@
if(update_now)
SStgui.update_uis(src)
/obj/machinery/computer/secure_data/detective_computer
icon = 'icons/obj/computer.dmi'
icon_state = "messyfiles"
/obj/machinery/computer/secure_data/laptop
name = "security laptop"
desc = "Nanotrasen Security laptop. Bringing modern compact computing to this century!"
+1 -1
View File
@@ -137,7 +137,7 @@ GLOBAL_LIST(tgui_logins)
state.name = usr.name
state.rank = "[R.modtype] [R.braintype]"
else if(login_type == LOGIN_TYPE_ADMIN && usr.can_admin_interact())
state.name = "CentCom Secure Connection"
state.name = "CentComm Secure Connection"
state.rank = "*CONFIDENTIAL*"
message_admins("[ADMIN_FULLMONTY(usr)] has logged in to [ADMIN_VV(src, name)] as Aghost")
@@ -233,7 +233,7 @@ const MedicalRecordsViewGeneral = (_properties, context) => {
textAlign="center"
color="label">
<img
src={p.substr(1, p.length - 1)}
src={p}
style={{
width: '96px',
'margin-bottom': '0.5rem',
@@ -197,8 +197,8 @@ const SecurityRecordsActions = (properties, context) => {
onClick={() => act('new_general')}
/>
<Button
icon={isPrinting ? 'spinner' : 'print'}
disabled={isPrinting}
icon={isPrinting ? 'spinner' : 'print'}
iconSpin={!!isPrinting}
content="Print Cell Log"
ml="0.25rem"
@@ -273,8 +273,8 @@ const SecurityRecordsPageView = (properties, context) => {
buttons={
<Fragment>
<Button
icon={isPrinting ? 'spinner' : 'print'}
disabled={isPrinting}
icon={isPrinting ? 'spinner' : 'print'}
iconSpin={!!isPrinting}
content="Print Record"
onClick={() => act('print_record')}
@@ -332,6 +332,7 @@ const SecurityRecordsViewGeneral = (_properties, context) => {
<Button
icon="pen"
ml="0.5rem"
mb={field.line_break ? '1rem' : 'initial'}
onClick={() => doEdit(context, field)}
/>
)}
@@ -348,7 +349,7 @@ const SecurityRecordsViewGeneral = (_properties, context) => {
textAlign="center"
color="label">
<img
src={p.substr(1, p.length - 1)}
src={p}
style={{
width: '96px',
'margin-bottom': '0.5rem',
@@ -9,7 +9,7 @@ import { Box, Button, Flex, Icon, Section } from '../../components';
* * `isAI` — Whether the user is an AI. If true, shows "Login as AI"
* * `isRobot` — Whether the user is a robot. If true, shows "Login as Cyborg"
* * `isAdmin` — Whether the user is an admin. If true, shows
* "Secure CentCom Login"
* "Secure CentComm Login"
*
* Clicking the main button calls the `login_insert` TGUI act.
* Clicking either the AI or normal login button calls
@@ -84,7 +84,7 @@ export const LoginScreen = (_properties, context) => {
{!!isAdmin && (
<Button
icon="sign-in-alt"
content="CentCom Secure Login"
content="CentComm Secure Login"
onClick={() => act('login_login', {
login_type: 4,
})}
File diff suppressed because one or more lines are too long