mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +01:00
Records Computer Tweaks (#21840)
I got annoyed one too many rounds in a row that I had to print the medical records to get the medical records, and did not know until writing this PR that you have to click where it says "medical" to view said records. So I have tweaked a bunch of things about the records, so that they now automatically open to the appropriate tab matching their records type, EG Medical Records opens by default to Medical Records. <img width="903" height="661" alt="image" src="https://github.com/user-attachments/assets/abea1c4b-c78d-4716-ada5-13a100a3316e" /> --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: Casper3667 <8396443+Casper3667@users.noreply.github.com>
This commit is contained in:
@@ -195,9 +195,6 @@
|
||||
/datum/record/medical
|
||||
var/blood_type = "AB+"
|
||||
var/blood_dna = "63920c3ec24b5d57d459b33a2f4d6446"
|
||||
var/disabilities = "No disabilities have been declared."
|
||||
var/allergies = "No allergies have been detected in this patient."
|
||||
var/diseases = "No diseases have been diagnosed at the moment."
|
||||
var/list/comments = list()
|
||||
|
||||
/datum/record/medical/New(var/mob/living/carbon/human/H, var/nid)
|
||||
@@ -210,6 +207,7 @@
|
||||
blood_dna = H.dna.unique_enzymes
|
||||
if(H.med_record && !jobban_isbanned(H, "Records"))
|
||||
notes = H.med_record
|
||||
else notes = "No history has been reported yet."
|
||||
|
||||
// Record for storing security data
|
||||
/datum/record/security
|
||||
|
||||
@@ -758,7 +758,6 @@
|
||||
var/message = "<b>Medical Records: [R.name]</b>\n\n" \
|
||||
+ "<b>Name:</b> [R.name] <b>Blood Type:</b> [R.medical.blood_type]\n" \
|
||||
+ "<b>DNA:</b> [R.medical.blood_dna]\n" \
|
||||
+ "<b>Disabilities:</b> [R.medical.disabilities]\n" \
|
||||
+ "<b>Notes:</b> [R.medical.notes]\n" \
|
||||
+ "<a href='byond://?src=[REF(src)];medrecordComment=`'>\[View Comment Log\]</a>"
|
||||
to_chat(usr, EXAMINE_BLOCK_DEEP_CYAN(message))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/datum/record/virus/active_virus
|
||||
var/listener/record/rconsole/listener
|
||||
var/authenticated = FALSE
|
||||
var/default_screen = "general"
|
||||
var/default_screen = "General"
|
||||
var/record_prefix = ""
|
||||
var/typechoices = list(
|
||||
"physical_status" = list("Active", "*Deceased*", "*SSD*", "*Missing*", "Physically Unfit", "Disabled"),
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
records_type = RECORD_MEDICAL | RECORD_VIRUS
|
||||
edit_type = RECORD_MEDICAL
|
||||
default_screen = "medical"
|
||||
default_screen = "Medical"
|
||||
program_icon_state = "medical_record"
|
||||
program_key_icon_state = "teal_key"
|
||||
color = LIGHT_COLOR_CYAN
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
records_type = RECORD_SECURITY
|
||||
edit_type = RECORD_SECURITY
|
||||
default_screen = "security"
|
||||
default_screen = "Security"
|
||||
program_icon_state = "security_record"
|
||||
program_key_icon_state = "yellow_key"
|
||||
color = LIGHT_COLOR_YELLOW
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
records_type = RECORD_GENERAL | RECORD_SECURITY
|
||||
edit_type = RECORD_GENERAL
|
||||
default_screen = "General"
|
||||
program_icon_state = "employment_record"
|
||||
program_key_icon_state = "lightblue_key"
|
||||
color = LIGHT_COLOR_BLUE
|
||||
@@ -267,12 +268,6 @@
|
||||
if("medical")
|
||||
if(!(edit_type & RECORD_MEDICAL))
|
||||
return FALSE
|
||||
if("diseases")
|
||||
if(!(edit_type & RECORD_MEDICAL))
|
||||
return FALSE
|
||||
if("allergies")
|
||||
if(!(edit_type & RECORD_MEDICAL))
|
||||
return FALSE
|
||||
if("blood_type")
|
||||
if(!(edit_type & RECORD_MEDICAL) || (edit_type & RECORD_SECURITY))
|
||||
return FALSE
|
||||
|
||||
@@ -167,9 +167,6 @@ Mental Status: [R.mental_status]<BR>
|
||||
<CENTER><B>Medical Data</B></CENTER><BR>
|
||||
Blood Type: [R.medical.blood_type]<BR>
|
||||
DNA: [R.medical.blood_dna]<BR><BR>
|
||||
Disabilities: [R.medical.disabilities]<BR><BR>
|
||||
Allergies: [R.medical.allergies]<BR>
|
||||
Current Diseases: [R.medical.diseases] (per disease info placed in log/comment section)<BR><BR>
|
||||
Important Notes:<BR>
|
||||
[replacetext(R.medical.notes, "\n", "<BR>")]<BR><BR>
|
||||
<CENTER><B>Comments/Log</B></CENTER><BR>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
author: Hellfirejag
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Records consoles now show their appropriate records types by default, EG: Medical showing full medical records, instead of only basic info."
|
||||
- rscdel: "Medical records no longer displays Allergies, Disabilities and Diseases. These were vestigial remnants of something removed from the game 10 years ago."
|
||||
@@ -18,6 +18,7 @@ import { Dropdown } from '../components/Dropdown';
|
||||
|
||||
export type RecordsData = {
|
||||
activeview: string;
|
||||
defaultview: string;
|
||||
editingvalue: string;
|
||||
physical_status_options: string[];
|
||||
criminal_status_options: string[];
|
||||
@@ -78,9 +79,6 @@ type Incident = {
|
||||
|
||||
type Medical = {
|
||||
notes: string;
|
||||
disabilities: string;
|
||||
allergies: string;
|
||||
diseases: string;
|
||||
blood_type: string;
|
||||
blood_dna: string;
|
||||
};
|
||||
@@ -195,7 +193,11 @@ export const ListAllRecords = (props, context) => {
|
||||
// Omega shitcode ahead but this is my like 56th UI and I don't give a fuck anymore.
|
||||
export const ListActive = (props, context) => {
|
||||
const { act, data } = useBackend<RecordsData>(context);
|
||||
const [recordTab, setRecordTab] = useLocalState(context, 'recordTab', 'All');
|
||||
const [recordTab, setRecordTab] = useLocalState(
|
||||
context,
|
||||
'recordTab',
|
||||
data.defaultview,
|
||||
);
|
||||
const [editingPhysStatus, setEditingPhysStatus] = useLocalState<boolean>(
|
||||
context,
|
||||
'editingPhysStatus',
|
||||
@@ -244,22 +246,6 @@ export const ListActive = (props, context) => {
|
||||
false,
|
||||
);
|
||||
|
||||
const [editingDisabilities, setEditingDisabilities] = useLocalState<boolean>(
|
||||
context,
|
||||
'editingDisabilities',
|
||||
false,
|
||||
);
|
||||
const [editingAllergies, setEditingAllergies] = useLocalState<boolean>(
|
||||
context,
|
||||
'editingAllergies',
|
||||
false,
|
||||
);
|
||||
const [editingDisease, setEditingDisease] = useLocalState<boolean>(
|
||||
context,
|
||||
'editingDisease',
|
||||
false,
|
||||
);
|
||||
|
||||
return (
|
||||
<Section
|
||||
fill
|
||||
@@ -559,93 +545,6 @@ export const ListActive = (props, context) => {
|
||||
data.active.medical.blood_dna
|
||||
)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Disabilities">
|
||||
{data.editable & 2 ? (
|
||||
<Box>
|
||||
{editingDisabilities ? (
|
||||
<Input
|
||||
placeholder={data.active.medical.disabilities}
|
||||
width="100%"
|
||||
onInput={(e, v) =>
|
||||
act('editrecord', {
|
||||
record_type: 'medical',
|
||||
key: 'fingerprint',
|
||||
value: v,
|
||||
})
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<Box>
|
||||
{data.active.medical.disabilities}
|
||||
<Button
|
||||
icon="pencil-ruler"
|
||||
onClick={() => setEditingDisabilities(true)}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
) : (
|
||||
data.active.medical.disabilities
|
||||
)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Allergies">
|
||||
{data.editable & 2 ? (
|
||||
<Box>
|
||||
{editingAllergies ? (
|
||||
<Input
|
||||
placeholder={data.active.medical.allergies}
|
||||
width="100%"
|
||||
onInput={(e, v) =>
|
||||
act('editrecord', {
|
||||
record_type: 'medical',
|
||||
key: 'allergies',
|
||||
value: v,
|
||||
})
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<Box>
|
||||
{data.active.medical.allergies}
|
||||
<Button
|
||||
icon="pencil-ruler"
|
||||
onClick={() => setEditingAllergies(true)}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
) : (
|
||||
data.active.medical.allergies
|
||||
)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Disease">
|
||||
{data.editable & 2 ? (
|
||||
<Box>
|
||||
{editingDisease ? (
|
||||
<Input
|
||||
placeholder={data.active.medical.diseases}
|
||||
width="100%"
|
||||
onInput={(e, v) =>
|
||||
act('editrecord', {
|
||||
record_type: 'medical',
|
||||
key: 'diseases',
|
||||
value: v,
|
||||
})
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<Box>
|
||||
{data.active.medical.diseases}
|
||||
<Button
|
||||
icon="pencil-ruler"
|
||||
onClick={() => setEditingDisease(true)}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
) : (
|
||||
data.active.medical.diseases
|
||||
)}
|
||||
</LabeledList.Item>
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user