diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 6bc2b3583378..e67af876d9eb 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -286,10 +286,10 @@ dat = replacetext(dat, "\t", "") 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, force = FALSE, use_real_name = TRUE) set waitfor = FALSE var/static/list/show_directions = list(SOUTH, WEST) - if(H.mind && (H.mind.assigned_role != H.mind.special_role)) + if(H.mind && (H.mind.assigned_role != H.mind.special_role) || force) var/assignment if(H.mind.role_alt_title) assignment = H.mind.role_alt_title @@ -300,6 +300,8 @@ else assignment = "Unassigned" + var/record_name = use_real_name ? H.real_name : H.name + var/static/record_id_num = 1001 var/id = num2hex(record_id_num++,6) if(!C) @@ -320,7 +322,7 @@ //General Record var/datum/data/record/G = new() G.fields["id"] = id - G.fields["name"] = H.real_name + G.fields["name"] = record_name G.fields["rank"] = assignment G.fields["age"] = H.age G.fields["species"] = H.dna.species.name @@ -341,7 +343,7 @@ //Medical Record var/datum/data/record/M = new() M.fields["id"] = id - M.fields["name"] = H.real_name + M.fields["name"] = record_name M.fields["blood_type"] = H.dna.blood_type M.fields["b_dna"] = H.dna.unique_enzymes M.fields["mi_dis"] = "None" @@ -358,7 +360,7 @@ //Security Record var/datum/data/record/S = new() S.fields["id"] = id - S.fields["name"] = H.real_name + S.fields["name"] = record_name S.fields["criminal"] = "None" S.fields["citation"] = list() S.fields["crimes"] = list() @@ -368,9 +370,9 @@ //Locked Record var/datum/data/record/L = new() - L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]") //surely this should just be id, like the others? - L.fields["name"] = H.real_name - L.fields["rank"] = H.mind.assigned_role + L.fields["id"] = md5("[record_name][assignment]") //surely this should just be id, like the others? + L.fields["name"] = record_name + L.fields["rank"] = assignment L.fields["age"] = H.age L.fields["gender"] = H.gender if(H.gender == "male") diff --git a/yogstation/code/modules/antagonists/infiltrator/items/services.dm b/yogstation/code/modules/antagonists/infiltrator/items/services.dm index 051d4c180121..7ccd0036c693 100644 --- a/yogstation/code/modules/antagonists/infiltrator/items/services.dm +++ b/yogstation/code/modules/antagonists/infiltrator/items/services.dm @@ -22,7 +22,8 @@ GLOBAL_VAR_INIT(next_button_push, 0) if(alert(user, "Are you sure you want your crew manifest entry to be [H.real_name], [ID.assignment]?", "", "Yes", "No") == "Yes") var/list/all_jobs = (GLOB.command_positions + GLOB.engineering_positions + GLOB.medical_positions + GLOB.science_positions + GLOB.supply_positions + GLOB.civilian_positions + GLOB.security_positions) if((ID.assignment in all_jobs) || (alert(user, "Are you sure you want your job to be '[ID.assignment]'? This is not a default job, and may look strange on the manifest!", "", "Yes", "No") == "Yes")) - GLOB.data_core.manifest_inject(H, H.client, ID.assignment) + H.mind.role_alt_title = ID.assignment + GLOB.data_core.manifest_inject(H, force = TRUE, use_real_name = FALSE) to_chat(user, span_notice("Added to manifest.")) do_sparks(2, FALSE, src) qdel(src)