Merge pull request #12706 from silicons/records

adds security/medical records to character setup
This commit is contained in:
Lin
2020-07-13 11:50:02 -05:00
committed by GitHub
4 changed files with 50 additions and 5 deletions

View File

@@ -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
@@ -340,6 +345,24 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Custom job preferences:</b><BR>"
dat += "<a href='?_src_=prefs;preference=ai_core_icon;task=input'><b>Preferred AI Core Display:</b> [preferred_ai_core_display]</a><br>"
dat += "<a href='?_src_=prefs;preference=sec_dept;task=input'><b>Preferred Security Department:</b> [prefered_security_department]</a><BR></td>"
dat += "<br>Records</b><br>"
dat += "<br><a href='?_src_=prefs;preference=security_records;task=input'><b>Security Records</b></a><br>"
if(length_char(security_records) <= 40)
if(!length(security_records))
dat += "\[...\]"
else
dat += "[security_records]"
else
dat += "[TextPreview(security_records)]...<BR>"
dat += "<br><a href='?_src_=prefs;preference=medical_records;task=input'><b>Medical Records</b></a><br>"
if(length_char(medical_records) <= 40)
if(!length(medical_records))
dat += "\[...\]<br>"
else
dat += "[medical_records]"
else
dat += "[TextPreview(medical_records)]...<BR>"
dat += "</tr></table>"
//Character Appearance
@@ -1646,6 +1669,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!", "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!", "Security 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))

View File

@@ -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"])

View File

@@ -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, humanc.client, humanc.client.prefs)
if(SSshuttle.arrivals)
SSshuttle.arrivals.QueueAnnounce(humanc, rank)
else