mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Resolves Issue 734
> A clown's medical, crew, and security records are updated with his newname. (read below for details) > reject_bad_name() now checks for dumb names like "space","floor","wall","r-wall","monkey","unknown","inactive ai" (if you know any other important ones let me know) > clname() [clown-name] and ainame() [AI name], procs which allow those players to rename themselves, were merged into /mob/proc/rename_self(var/role, var/allow_numbers=0) This proc gives the mob 3 chances to name itself. It checks names using reject_bad_name() (the same thing that checks the round-start names). If it fails 3 times it will not change the name. If it succeeds it will call the proc in the next bullet point. > /mob/proc/fully_replace_character_name(var/oldname,var/newname) will replace most references to a mob's oldname and replace it with newname. It updates name, real_name, mind.name, updates their id, updates their pda and updates all their data_core records (manifest records like medical, security, general, locked) > data_core procs merged because they were massive and all identical. > accidentally fixed an AI sound which accidentally played upon login. It conflicted with the "Welcome to the station crew" announcement. So I commented that out to try the 'new' fixed one. If people hate it I'll comment it back to how it was. > naming a mob with the big name at the top of viewvars will use fully_replace_character_name() > Removed an uneccessary regenerate_icons() proc from every player which spawns. Should speed up spawns a smidge git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4396 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -4,68 +4,7 @@
|
||||
if(!nosleep)
|
||||
sleep(40)
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if (!isnull(H.mind) && (H.mind.assigned_role != "MODE"))
|
||||
var/datum/data/record/G = new()
|
||||
var/datum/data/record/M = new()
|
||||
var/datum/data/record/S = new()
|
||||
var/datum/data/record/L = new()
|
||||
var/obj/item/weapon/card/id/C = H.wear_id
|
||||
if (C)
|
||||
G.fields["rank"] = C.assignment
|
||||
else
|
||||
if(H.job)
|
||||
G.fields["rank"] = H.job
|
||||
else
|
||||
G.fields["rank"] = "Unassigned"
|
||||
G.fields["name"] = H.real_name
|
||||
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
|
||||
M.fields["name"] = G.fields["name"]
|
||||
M.fields["id"] = G.fields["id"]
|
||||
S.fields["name"] = G.fields["name"]
|
||||
S.fields["id"] = G.fields["id"]
|
||||
if (H.gender == FEMALE)
|
||||
G.fields["sex"] = "Female"
|
||||
else
|
||||
G.fields["sex"] = "Male"
|
||||
G.fields["age"] = text("[]", H.age)
|
||||
G.fields["fingerprint"] = text("[]", md5(H.dna.uni_identity))
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
M.fields["b_type"] = text("[]", H.b_type)
|
||||
M.fields["b_dna"] = H.dna.unique_enzymes
|
||||
M.fields["mi_dis"] = "None"
|
||||
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
|
||||
M.fields["ma_dis"] = "None"
|
||||
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
|
||||
M.fields["alg"] = "None"
|
||||
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."
|
||||
S.fields["criminal"] = "None"
|
||||
S.fields["mi_crim"] = "None"
|
||||
S.fields["mi_crim_d"] = "No minor crime convictions."
|
||||
S.fields["ma_crim"] = "None"
|
||||
S.fields["ma_crim_d"] = "No major crime convictions."
|
||||
S.fields["notes"] = "No notes."
|
||||
|
||||
//Begin locked reporting
|
||||
L.fields["name"] = H.real_name
|
||||
L.fields["sex"] = H.gender
|
||||
L.fields["age"] = H.age
|
||||
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
|
||||
L.fields["rank"] = H.mind.assigned_role
|
||||
L.fields["b_type"] = H.b_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
||||
L.fields["identity"] = H.dna.uni_identity
|
||||
L.fields["image"] = getFlatIcon(H,0)
|
||||
//End locked reporting
|
||||
|
||||
general += G
|
||||
medical += M
|
||||
security += S
|
||||
locked += L
|
||||
manifest_inject(H)
|
||||
return
|
||||
|
||||
/obj/effect/datacore/proc/manifest_modify(var/name, var/assignment)
|
||||
@@ -80,66 +19,74 @@
|
||||
foundrecord.fields["rank"] = assignment
|
||||
|
||||
|
||||
|
||||
/obj/effect/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
|
||||
if (!isnull(H.mind) && (H.mind.assigned_role != "MODE"))
|
||||
var/datum/data/record/G = new()
|
||||
var/datum/data/record/M = new()
|
||||
var/datum/data/record/S = new()
|
||||
var/datum/data/record/L = new()
|
||||
var/obj/item/weapon/card/id/C = H.wear_id
|
||||
if (C)
|
||||
G.fields["rank"] = C.assignment
|
||||
if(H.mind && (H.mind.assigned_role != "MODE"))
|
||||
var/assignment
|
||||
if(istype(H.wear_id))
|
||||
var/obj/item/weapon/card/id/Card = H.wear_id
|
||||
assignment = Card.assignment
|
||||
else
|
||||
if(H.job)
|
||||
G.fields["rank"] = H.job
|
||||
assignment = H.job
|
||||
else
|
||||
G.fields["rank"] = "Unassigned"
|
||||
G.fields["name"] = H.real_name
|
||||
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
|
||||
M.fields["name"] = G.fields["name"]
|
||||
M.fields["id"] = G.fields["id"]
|
||||
S.fields["name"] = G.fields["name"]
|
||||
S.fields["id"] = G.fields["id"]
|
||||
if (H.gender == FEMALE)
|
||||
G.fields["sex"] = "Female"
|
||||
else
|
||||
G.fields["sex"] = "Male"
|
||||
G.fields["age"] = text("[]", H.age)
|
||||
G.fields["fingerprint"] = text("[]", md5(H.dna.uni_identity))
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
M.fields["b_type"] = text("[]", H.b_type)
|
||||
M.fields["b_dna"] = H.dna.unique_enzymes
|
||||
M.fields["mi_dis"] = "None"
|
||||
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
|
||||
M.fields["ma_dis"] = "None"
|
||||
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
|
||||
M.fields["alg"] = "None"
|
||||
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."
|
||||
S.fields["criminal"] = "None"
|
||||
S.fields["mi_crim"] = "None"
|
||||
S.fields["mi_crim_d"] = "No minor crime convictions."
|
||||
S.fields["ma_crim"] = "None"
|
||||
S.fields["ma_crim_d"] = "No major crime convictions."
|
||||
S.fields["notes"] = "No notes."
|
||||
assignment = "Unassigned"
|
||||
|
||||
//Begin locked reporting
|
||||
L.fields["name"] = H.real_name
|
||||
L.fields["sex"] = H.gender
|
||||
L.fields["age"] = H.age
|
||||
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
|
||||
L.fields["rank"] = H.mind.assigned_role
|
||||
L.fields["b_type"] = H.b_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
||||
L.fields["identity"] = H.dna.uni_identity
|
||||
L.fields["image"] = getFlatIcon(H,0)
|
||||
//End locked reporting
|
||||
var/id = add_zero(num2hex(rand(1, 1.6777215E7)), 6) //this was the ebst they could come up with? A large random number? *sigh*
|
||||
|
||||
//General Record
|
||||
var/datum/data/record/G = new()
|
||||
G.fields["id"] = id
|
||||
G.fields["name"] = H.real_name
|
||||
G.fields["rank"] = assignment
|
||||
G.fields["age"] = H.age
|
||||
G.fields["fingerprint"] = md5(H.dna.uni_identity)
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
G.fields["sex"] = H.gender
|
||||
general += G
|
||||
|
||||
//Medical Record
|
||||
var/datum/data/record/M = new()
|
||||
M.fields["id"] = id
|
||||
M.fields["name"] = H.real_name
|
||||
M.fields["b_type"] = H.b_type
|
||||
M.fields["b_dna"] = H.dna.unique_enzymes
|
||||
M.fields["mi_dis"] = "None"
|
||||
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
|
||||
M.fields["ma_dis"] = "None"
|
||||
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
|
||||
M.fields["alg"] = "None"
|
||||
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."
|
||||
medical += M
|
||||
|
||||
//Security Record
|
||||
var/datum/data/record/S = new()
|
||||
S.fields["id"] = id
|
||||
S.fields["name"] = H.real_name
|
||||
S.fields["criminal"] = "None"
|
||||
S.fields["mi_crim"] = "None"
|
||||
S.fields["mi_crim_d"] = "No minor crime convictions."
|
||||
S.fields["ma_crim"] = "None"
|
||||
S.fields["ma_crim_d"] = "No major crime convictions."
|
||||
S.fields["notes"] = "No notes."
|
||||
security += S
|
||||
|
||||
//Locked Record
|
||||
var/datum/data/record/L = new()
|
||||
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
|
||||
L.fields["name"] = H.real_name
|
||||
L.fields["rank"] = H.mind.assigned_role
|
||||
L.fields["age"] = H.age
|
||||
L.fields["sex"] = H.gender
|
||||
L.fields["b_type"] = H.b_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
||||
L.fields["identity"] = H.dna.uni_identity
|
||||
L.fields["image"] = getFlatIcon(H,0) //This is god-awful
|
||||
locked += L
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user