From cee15792b7edef93bec4db170cbbe9ee49839fd2 Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Tue, 7 Jul 2020 07:25:10 -0700
Subject: [PATCH 1/4] ok
---
code/datums/datacore.dm | 8 ++---
code/modules/client/preferences.dm | 34 +++++++++++++++++++
.../modules/mob/dead/new_player/new_player.dm | 2 +-
3 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 84ea6b6458..94940b3855 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -81,7 +81,7 @@
if(N.new_character)
log_manifest(N.ckey,N.new_character.mind,N.new_character)
if(ishuman(N.new_character))
- manifest_inject(N.new_character, N.client)
+ manifest_inject(N.new_character, N.client, N.client.prefs)
CHECK_TICK
/datum/datacore/proc/manifest_modify(name, assignment)
@@ -197,7 +197,7 @@
return dat
-/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C)
+/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C, datum/preferences/prefs)
set waitfor = FALSE
var/static/list/show_directions = list(SOUTH, WEST)
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
@@ -260,7 +260,7 @@
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
- M.fields["notes"] = H.get_trait_string(medical)
+ M.fields["notes"] = "Trait information as of shift start: [H.get_trait_string(medical)]
[prefs.medical_records]"
medical += M
//Security Record
@@ -270,7 +270,7 @@
S.fields["criminal"] = "None"
S.fields["mi_crim"] = list()
S.fields["ma_crim"] = list()
- S.fields["notes"] = "No notes."
+ S.fields["notes"] = prefs.security_records || "No notes."
security += S
//Locked Record
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index aaee5c85f6..738a2c6fd4 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -165,6 +165,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/custom_speech_verb = "default" //if your say_mod is to be something other than your races
var/custom_tongue = "default" //if your tongue is to be something other than your races
+ /// Security record note section
+ var/security_records
+ /// Medical record note section
+ var/medical_records
+
var/list/custom_names = list()
var/preferred_ai_core_display = "Blue"
var/prefered_security_department = SEC_DEPT_RANDOM
@@ -342,6 +347,25 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Preferred Security Department: [prefered_security_department]
"
dat += ""
+ dat += "Security Records
"
+ if(length_char(security_records) <= 40)
+ if(!length(security_records))
+ dat += "\[...\]"
+ else
+ dat += "[security_records]"
+ else
+ dat += "[TextPreview(security_records)]...
"
+
+ dat += "Medical Records
"
+ if(length_char(medical_records) <= 40)
+ if(!length(medical_records))
+ dat += "\[...\]"
+ else
+ dat += "[medical_records]"
+ else
+ dat += "[TextPreview(medical_records)]...
"
+
+
//Character Appearance
if(2)
if(path)
@@ -1646,6 +1670,16 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
+ if("security_records")
+ var/rec = stripped_multiline_input(usr, "Set your security record note section. This should be IC!", "Securitty Records", html_decode(security_records), MAX_FLAVOR_LEN, TRUE)
+ if(!isnull(rec))
+ security_records = rec
+
+ if("medical_records")
+ var/rec = stripped_multiline_input(usr, "Set your medical record note section. This should be IC!", "Securitty Records", html_decode(medical_records), MAX_FLAVOR_LEN, TRUE)
+ if(!isnull(rec))
+ medical_records = rec
+
if("flavor_text")
var/msg = stripped_multiline_input(usr, "Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!", "Flavor Text", html_decode(features["flavor_text"]), MAX_FLAVOR_LEN, TRUE)
if(!isnull(msg))
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index 6888a6590f..be18f78cfb 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -398,7 +398,7 @@
humanc = character //Let's retypecast the var to be human,
if(humanc) //These procs all expect humans
- GLOB.data_core.manifest_inject(humanc)
+ GLOB.data_core.manifest_inject(humanc, client, client.prefs)
if(SSshuttle.arrivals)
SSshuttle.arrivals.QueueAnnounce(humanc, rank)
else
From 6634e43be4e60c9f52d18beabebfc0db196cea07 Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Tue, 7 Jul 2020 07:41:33 -0700
Subject: [PATCH 2/4] fix
---
code/modules/client/preferences.dm | 11 +++++------
code/modules/mob/dead/new_player/new_player.dm | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 738a2c6fd4..1b6b149d66 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -345,9 +345,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Custom job preferences:
"
dat += "Preferred AI Core Display: [preferred_ai_core_display]
"
dat += "Preferred Security Department: [prefered_security_department]
"
- dat += ""
-
- dat += "Security Records
"
+ dat += "
Records
"
+ dat += "
Security Records
"
if(length_char(security_records) <= 40)
if(!length(security_records))
dat += "\[...\]"
@@ -356,15 +355,15 @@ GLOBAL_LIST_EMPTY(preferences_datums)
else
dat += "[TextPreview(security_records)]...
"
- dat += "Medical Records
"
+ dat += "
Medical Records
"
if(length_char(medical_records) <= 40)
if(!length(medical_records))
- dat += "\[...\]"
+ dat += "\[...\]
"
else
dat += "[medical_records]"
else
dat += "[TextPreview(medical_records)]...
"
-
+ dat += ""
//Character Appearance
if(2)
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index be18f78cfb..d3892cc282 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -398,7 +398,7 @@
humanc = character //Let's retypecast the var to be human,
if(humanc) //These procs all expect humans
- GLOB.data_core.manifest_inject(humanc, client, client.prefs)
+ GLOB.data_core.manifest_inject(humanc, humanc.client, humanc.client.prefs)
if(SSshuttle.arrivals)
SSshuttle.arrivals.QueueAnnounce(humanc, rank)
else
From 22c3d9fe3ed123c4b7da8cc7b3528092e2208d98 Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Tue, 7 Jul 2020 21:07:13 -0700
Subject: [PATCH 3/4] ok
---
code/modules/client/preferences_savefile.dm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 3a8e7582cb..440ee1fbc1 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -515,6 +515,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Quirks
S["all_quirks"] >> all_quirks
+ //Records
+ S["security_records"] >> security_records
+ S["medical_records"] >> medical_records
+
//Citadel code
S["feature_genitals_use_skintone"] >> features["genitals_use_skintone"]
S["feature_mcolor2"] >> features["mcolor2"]
@@ -698,6 +702,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
custom_speech_verb = sanitize_inlist(custom_speech_verb, GLOB.speech_verbs, "default")
custom_tongue = sanitize_inlist(custom_tongue, GLOB.roundstart_tongues, "default")
+ security_records = copytext(security_records, 1, MAX_FLAVOR_LEN)
+ medical_records = copytext(medical_records, 1, MAX_FLAVOR_LEN)
+
features["flavor_text"] = copytext(features["flavor_text"], 1, MAX_FLAVOR_LEN)
features["silicon_flavor_text"] = copytext(features["silicon_flavor_text"], 1, MAX_FLAVOR_LEN)
features["ooc_notes"] = copytext(features["ooc_notes"], 1, MAX_FLAVOR_LEN)
@@ -762,6 +769,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["species"] , pref_species.id)
WRITE_FILE(S["custom_speech_verb"] , custom_speech_verb)
WRITE_FILE(S["custom_tongue"] , custom_tongue)
+
+ // records
+ WRITE_FILE(S["security_records"] , security_records)
+ WRITE_FILE(S["medical_records"] , medical_records)
+
WRITE_FILE(S["feature_mcolor"] , features["mcolor"])
WRITE_FILE(S["feature_lizard_tail"] , features["tail_lizard"])
WRITE_FILE(S["feature_human_tail"] , features["tail_human"])
From f7b476bc6408660a5ff72bf9105541ce7b58ba94 Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Sat, 11 Jul 2020 21:23:06 -0700
Subject: [PATCH 4/4] Update preferences.dm
---
code/modules/client/preferences.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 1b6b149d66..8b4c28a1f4 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1670,12 +1670,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("security_records")
- var/rec = stripped_multiline_input(usr, "Set your security record note section. This should be IC!", "Securitty Records", html_decode(security_records), MAX_FLAVOR_LEN, TRUE)
+ var/rec = stripped_multiline_input(usr, "Set your security record note section. This should be IC!", "Security Records", html_decode(security_records), MAX_FLAVOR_LEN, TRUE)
if(!isnull(rec))
security_records = rec
if("medical_records")
- var/rec = stripped_multiline_input(usr, "Set your medical record note section. This should be IC!", "Securitty Records", html_decode(medical_records), MAX_FLAVOR_LEN, TRUE)
+ var/rec = stripped_multiline_input(usr, "Set your medical record note section. This should be IC!", "Security Records", html_decode(medical_records), MAX_FLAVOR_LEN, TRUE)
if(!isnull(rec))
medical_records = rec