diff --git a/code/__DEFINES/say.dm b/code/__DEFINES/say.dm index 928f81bd..e0b916cb 100644 --- a/code/__DEFINES/say.dm +++ b/code/__DEFINES/say.dm @@ -77,6 +77,7 @@ //Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam #define MAX_MESSAGE_LEN 2048 //Citadel edit: What's the WORST that could happen? +#define MAX_FLAVOR_LEN 4096 //double the maximum message length. #define MAX_NAME_LEN 42 #define MAX_BROADCAST_LEN 512 #define MAX_CHARTER_LEN 80 diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 52a5dc64..3a9e3967 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)) @@ -261,7 +261,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"] = "No notes." + M.fields["notes"] = prefs.medical_records || "No notes." //ET TU, HACKY CODE? medical += M //Security Record @@ -271,7 +271,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/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index b4011d57..ee4e5289 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -678,7 +678,7 @@ What a mess.*/ GLOB.data_core.removeMajorCrime(active1.fields["id"], href_list["cdataid"]) if("notes") if(istype(active2, /datum/data/record)) - var/t1 = stripped_input(usr, "Please summarize notes:", "Secure. records", active2.fields["notes"], null) + var/t1 = stripped_multiline_input(usr, "Please summarize notes:", "Secure records", active2.fields["notes"], 8192) if(!canUseSecurityRecordsConsole(usr, t1, null, a2)) return active2.fields["notes"] = t1 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index e1213955..28ae3ea7 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -176,6 +176,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) "flavor_text" = "" ) + /// 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 @@ -343,6 +348,24 @@ 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 += "
Records
" + 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)]...
" dat += "" //Character Appearance @@ -1620,6 +1643,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_MESSAGE_LEN*2, TRUE) if(!isnull(msg)) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index d72092ed..cca8266c 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -348,6 +348,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["negative_quirks"] >> negative_quirks S["neutral_quirks"] >> neutral_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_exhibitionist"] >> features["exhibitionist"] @@ -479,7 +483,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high)) job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med)) job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low)) - + security_records = copytext(security_records, 1, MAX_FLAVOR_LEN) + medical_records = copytext(medical_records, 1, MAX_FLAVOR_LEN) all_quirks = SANITIZE_LIST(all_quirks) positive_quirks = SANITIZE_LIST(positive_quirks) negative_quirks = SANITIZE_LIST(negative_quirks) @@ -566,7 +571,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["job_engsec_high"] , job_engsec_high) WRITE_FILE(S["job_engsec_med"] , job_engsec_med) WRITE_FILE(S["job_engsec_low"] , job_engsec_low) - + //Record Flavor Text + WRITE_FILE(S["security_records"] , security_records) + WRITE_FILE(S["medical_records"] , medical_records) //Quirks WRITE_FILE(S["all_quirks"] , all_quirks) WRITE_FILE(S["positive_quirks"] , positive_quirks) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index d055f097..b73b8a0c 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -401,7 +401,7 @@ humanc = character //Let's retypecast the var to be human, if(humanc) //These procs all expect humans - GLOB.data_core.manifest_inject(humanc, humanc.client) + GLOB.data_core.manifest_inject(humanc, humanc.client, humanc.client.prefs) if(SSshuttle.arrivals) SSshuttle.arrivals.QueueAnnounce(humanc, rank) else