diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 368a3e69c93..9dc95c688c0 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -202,6 +202,8 @@ var/record_id_num = 1001 G.fields["p_stat"] = "Active" G.fields["m_stat"] = "Stable" G.fields["sex"] = H.gender + G.fields["photo_front"] = icon(get_id_photo(H), dir = SOUTH) + G.fields["photo_side"] = icon(get_id_photo(H), dir = WEST) general += G //Medical Record @@ -246,3 +248,163 @@ var/record_id_num = 1001 locked += L return +/obj/effect/datacore/proc/get_id_photo(var/mob/living/carbon/human/H) + var/icon/photo = null + var/g = (H.gender == FEMALE) ? "f" : "m" + if(!config.mutant_races || H.dna.species.use_skintones) + photo = icon("icon" = 'icons/mob/human.dmi', "icon_state" = "[H.skin_tone]_[g]_s") + else + photo = icon("icon" = 'icons/mob/human.dmi', "icon_state" = "[H.dna.species.id]_[g]_s") + photo.Blend("#[H.dna.mutant_color]", ICON_MULTIPLY) + + var/icon/eyes_s + if(EYECOLOR in H.dna.species.specflags) + eyes_s = icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "[H.dna.species.eyes]_s") + eyes_s.Blend("#[H.eye_color]", ICON_MULTIPLY) + + var/datum/sprite_accessory/S + S = hair_styles_list[H.hair_style] + if(S && (HAIR in H.dna.species.specflags)) + var/icon/hair_s = icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s") + hair_s.Blend("#[H.hair_color]", ICON_MULTIPLY) + eyes_s.Blend(hair_s, ICON_OVERLAY) + + S = facial_hair_styles_list[H.facial_hair_style] + if(S && (FACEHAIR in H.dna.species.specflags)) + var/icon/facial_s = icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s") + facial_s.Blend("#[H.facial_hair_color]", ICON_MULTIPLY) + eyes_s.Blend(facial_s, ICON_OVERLAY) + + if(eyes_s) + photo.Blend(eyes_s, ICON_OVERLAY) + + var/icon/clothes_s = null + switch(H.mind.assigned_role) + if("Head of Personnel") + clothes_s = icon('icons/mob/uniform.dmi', "hop_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + if("Bartender") + clothes_s = icon('icons/mob/uniform.dmi', "ba_suit_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "armoralt"), ICON_OVERLAY) + if("Botanist") + clothes_s = icon('icons/mob/uniform.dmi', "hydroponics_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY) + if("Cook") + clothes_s = icon('icons/mob/uniform.dmi', "chef_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "chef"), ICON_OVERLAY) + if("Janitor") + clothes_s = icon('icons/mob/uniform.dmi', "janitor_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Librarian") + clothes_s = icon('icons/mob/uniform.dmi', "red_suit_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Quartermaster") + clothes_s = icon('icons/mob/uniform.dmi', "qm_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + if("Cargo Technician") + clothes_s = icon('icons/mob/uniform.dmi', "cargo_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Shaft Miner") + clothes_s = icon('icons/mob/uniform.dmi', "miner_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Lawyer") + clothes_s = icon('icons/mob/uniform.dmi', "bluesuit_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY) + if("Chaplain") + clothes_s = icon('icons/mob/uniform.dmi', "chapblack_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Clown") + clothes_s = icon('icons/mob/uniform.dmi', "clown_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "clown"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY) + if("Mime") + clothes_s = icon('icons/mob/uniform.dmi', "mime_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY) + if("Research Director") + clothes_s = icon('icons/mob/uniform.dmi', "director_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat"), ICON_OVERLAY) + clothes_s.Blend(icon('icons/mob/items_lefthand.dmi', "clipboard"), ICON_OVERLAY) + if("Scientist") + clothes_s = icon('icons/mob/uniform.dmi', "toxinswhite_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat_tox"), ICON_OVERLAY) + if("Chemist") + clothes_s = icon('icons/mob/uniform.dmi', "chemistrywhite_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat_chem"), ICON_OVERLAY) + if("Chief Medical Officer") + clothes_s = icon('icons/mob/uniform.dmi', "cmo_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat_cmo"), ICON_OVERLAY) + if("Doctor") + clothes_s = icon('icons/mob/uniform.dmi', "medical_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat"), ICON_OVERLAY) + if("Geneticist") + clothes_s = icon('icons/mob/uniform.dmi', "geneticswhite_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat_gen"), ICON_OVERLAY) + if("Virologist") + clothes_s = icon('icons/mob/uniform.dmi', "virologywhite_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat_vir"), ICON_OVERLAY) + if("Roboticist") + clothes_s = icon('icons/mob/uniform.dmi', "robotics_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "labcoat"), ICON_OVERLAY) + if("Captain") + clothes_s = icon('icons/mob/uniform.dmi', "captain_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "capcarapace"), ICON_OVERLAY) + if("Head of Security") + clothes_s = icon('icons/mob/uniform.dmi', "hos_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "hostrench"), ICON_OVERLAY) + if("Warden") + clothes_s = icon('icons/mob/uniform.dmi', "warden_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "warden_jacket"), ICON_OVERLAY) + if("Detective") + clothes_s = icon('icons/mob/uniform.dmi', "detective_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY) + clothes_s.Blend(icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY) + if("Security Officer") + clothes_s = icon('icons/mob/uniform.dmi', "security_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY) + if("Chief Engineer") + clothes_s = icon('icons/mob/uniform.dmi', "chief_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) + if("Station Engineer") + clothes_s = icon('icons/mob/uniform.dmi', "engine_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) + if("Atmospheric Technician") + clothes_s = icon('icons/mob/uniform.dmi', "atmos_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) + if("Assistant") + clothes_s = icon('icons/mob/uniform.dmi', "grey_s") + clothes_s.Blend(icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + + if(clothes_s) + photo.Blend(clothes_s, ICON_OVERLAY) + + return photo \ No newline at end of file diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 5fe0b91cc05..d44f044f352 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -160,6 +160,8 @@ if(3.0) dat += "Security Record
" if ((istype(active1, /datum/data/record) && data_core.general.Find(active1))) + user << browse_rsc(active1.fields["photo_front"], "photo_front") + user << browse_rsc(active1.fields["photo_side"], "photo_side") dat += {" @@ -169,7 +171,7 @@ -
Name: [active1.fields["name"]] 
ID: [active1.fields["id"]] 
Fingerprint: [active1.fields["fingerprint"]] 
Physical Status: [active1.fields["p_stat"]] 
Mental Status: [active1.fields["m_stat"]] 
"} +
"} else dat += "General Record Lost!
" if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))