diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index c0aadf28ad1..2abd48068d4 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -67,7 +67,10 @@ 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." + if(H.med_record && !jobban_isbanned(H, "Records")) + M.fields["notes"] = H.med_record + else + M.fields["notes"] = "No notes found." medical += M //Security Record @@ -80,6 +83,10 @@ S.fields["ma_crim"] = "None" S.fields["ma_crim_d"] = "No major crime convictions." S.fields["notes"] = "No notes." + if(H.sec_record && !jobban_isbanned(H, "Records")) + S.fields["notes"] = H.sec_record + else + S.fields["notes"] = "No notes." security += S //Locked Record diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 58edea29c82..56e1c53b51f 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -496,6 +496,12 @@ var/jobName var/realJobName + // hack for alt titles + if(istype(loc, /mob)) + var/mob/M = loc + if(M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs()) + return M.mind.assigned_role + if(istype(src, /obj/item/device/pda)) if(src:id) jobName = src:id:assignment diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 907994efdef..07b1a4ee1a3 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -28,5 +28,8 @@ //the type of the ID the player will have var/idtype = /obj/item/weapon/card/id + //List of alternate titles, if any + var/list/alt_titles + /datum/job/proc/equip(var/mob/living/carbon/human/H) return 1 diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index efd5ba1c55a..fd5ac0f0034 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -40,6 +40,7 @@ spawn_positions = 3 supervisors = "the chief medical officer" selection_color = "#ffeef0" + alt_titles = list("Surgeon", "Emergency Physician") equip(var/mob/living/carbon/human/H) @@ -49,10 +50,17 @@ if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) + if(H.mind.role_alt_title && H.mind.role_alt_title == "Emergency Physician") + H.equip_if_possible(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) + H.equip_if_possible(new /obj/item/clothing/suit/fr_jacket(H), slot_wear_suit) + else if(H.mind.role_alt_title && H.mind.role_alt_title == "Surgeon") + H.equip_if_possible(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform) + H.equip_if_possible(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit) + else + H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) if(H.backbag == 1) diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 0c0fe506f74..b12ab1f78f5 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -84,6 +84,7 @@ spawn_positions = 1 supervisors = "the head of security" selection_color = "#ffeeee" + alt_titles = list("Forensic Technician") equip(var/mob/living/carbon/human/H) @@ -96,12 +97,15 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head) - var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H) +/* var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H) CIG.light("") - H.equip_to_slot_or_del(CIG, slot_wear_mask) + H.equip_to_slot_or_del(CIG, slot_wear_mask) */ H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(H), slot_wear_suit) + if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician") + H.equip_to_slot_or_del(new /obj/item/clothing/suit/forensics/blue(H), slot_wear_suit) + else + H.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(H), slot_wear_suit) + H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head) H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(H), slot_l_store) if(H.backbag == 1)//Why cant some of these things spawn in his office? diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index d2bb20e88b9..c8a46312806 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -44,6 +44,8 @@ var/global/datum/controller/occupations/job_master if(J.title == rank) return J return null + proc/GetAltTitle(mob/new_player/player, rank) + return player.preferences.GetAltTitle(GetJob(rank)) proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0) Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]") @@ -57,6 +59,7 @@ var/global/datum/controller/occupations/job_master if((job.current_positions < position_limit) || position_limit == -1) Debug("Player: [player] is now Rank: [rank], JCP:[job.current_positions], JPL:[position_limit]") player.mind.assigned_role = rank + player.mind.role_alt_title = GetAltTitle(player, rank) unassigned -= player job.current_positions++ return 1 @@ -296,6 +299,9 @@ var/global/datum/controller/occupations/job_master H << "Your job is [rank] and the game just can't handle it! Please report this bug to an administrator." H.job = rank + if(H.mind && H.mind.assigned_role != rank) + H.mind.assigned_role = rank + H.mind.role_alt_title = null if(!joined_late) var/obj/S = null @@ -338,15 +344,19 @@ var/global/datum/controller/occupations/job_master H << "You are the [rank]." H << "As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this." - spawnId(H,rank) + if(H.mind.assigned_role == rank && H.mind.role_alt_title) + spawnId(H, rank, H.mind.role_alt_title) + else + spawnId(H,rank) H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears) // H.update_icons() return 1 - proc/spawnId(var/mob/living/carbon/human/H, rank) + proc/spawnId(var/mob/living/carbon/human/H, rank, title) if(!H) return 0 + if(!title) title = rank var/obj/item/weapon/card/id/C = null var/datum/job/job = null @@ -364,9 +374,9 @@ var/global/datum/controller/occupations/job_master C = new /obj/item/weapon/card/id(H) if(C) C.registered_name = H.real_name - C.assignment = rank + C.assignment = title C.name = "[C.registered_name]'s ID Card ([C.assignment])" - C.access = get_access(C.assignment) + C.access = get_access(rank) H.equip_to_slot_or_del(C, slot_wear_id) /* if(prob(50)) H.equip_to_slot_or_del(new /obj/item/weapon/pen(H), slot_r_store) diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 4db772a936d..d94db5c3c27 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -112,4 +112,10 @@ name = "suspenders" desc = "They suspend the illusion of the mime's play." icon = 'icons/obj/clothing/belts.dmi' - icon_state = "suspenders" \ No newline at end of file + icon_state = "suspenders" + +/obj/item/clothing/suit/fr_jacket + name = "first responder jacket" + desc = "A high-visibility jacket worn by medical first responders." + icon_state = "fr_jacket_open" + item_state = "fr_jacket" \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f28dc77e2e7..9809f48773e 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -64,6 +64,8 @@ var/real_name = null // var/original_name = null //Original name is only used in ghost chat! Depracated, now used bb var/flavor_text = "" + var/med_record = "" + var/sec_record = "" var/blinded = null var/bhunger = 0 //Carbon var/ajourn = 0 diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index d60e7a041a3..1b236500d61 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -272,7 +272,7 @@ datum/preferences if(jobban_isbanned(user, "Records")) dat += "You are banned from using character records.
" else - dat += "Character Records

" + dat += "Character Records

" dat += "Flavor Text
" dat += "Change
" @@ -401,14 +401,14 @@ datum/preferences HTML += "
" HTML += "Set Character Records
" - HTML += "Medical Records
" + HTML += "Medical Records
" if(lentext(med_record) <= 40) HTML += "[med_record]" else HTML += "[copytext(med_record, 1, 37)]..." - HTML += "

Security Records
" + HTML += "

Security Records
" if(lentext(sec_record) <= 40) HTML += "[sec_record]
" @@ -416,7 +416,7 @@ datum/preferences HTML += "[copytext(sec_record, 1, 37)]...
" HTML += "
" - HTML += "\[Done\]" + HTML += "\[Done\]" HTML += "
" user << browse(null, "window=preferences") @@ -453,7 +453,7 @@ datum/preferences //The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows. var/datum/job/lastJob - + if (!job_master) return for(var/datum/job/job in job_master.occupations) index += 1 @@ -500,6 +500,8 @@ datum/preferences HTML += " \[Low]" else HTML += " \[NEVER]" + if(job.alt_titles) + HTML += "
\[[GetAltTitle(job)]\]" HTML += "" HTML += "" @@ -625,7 +627,6 @@ datum/preferences proc/process_link(mob/user, list/href_list) if(!user) return - if(href_list["preference"] == "job") switch(href_list["task"]) if("close") @@ -634,6 +635,14 @@ datum/preferences if("random") userandomjob = !userandomjob SetChoices(user) + if ("alt_title") + var/datum/job/job = locate(href_list["job"]) + if (job) + var/choices = list(job.title) + job.alt_titles + var/choice = input("Pick a title for [job.title].", "Character Generation", GetAltTitle(job)) as anything in choices | null + if(choice) + SetAltTitle(job, choice) + SetChoices(user) if("input") SetJob(user, href_list["text"]) else @@ -674,6 +683,32 @@ datum/preferences SetSkills(user) return 1 + else if(href_list["preference"] == "records") + if(text2num(href_list["record"]) >= 1) + SetRecords(user) + return + else + user << browse(null, "window=records") + if(href_list["task"] == "med_record") + var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message + + if(medmsg != null) + medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN) + medmsg = html_encode(medmsg) + + med_record = medmsg + SetRecords(user) + + if(href_list["task"] == "sec_record") + var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message + + if(secmsg != null) + secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN) + secmsg = html_encode(secmsg) + + sec_record = secmsg + SetRecords(user) + switch(href_list["task"]) if("random") switch(href_list["preference"]) @@ -936,33 +971,6 @@ datum/preferences else user << browse(null, "window=disabil") - if("records") - if(text2num(href_list["records"]) >= 1) - SetRecords(user) - return - else - user << browse(null, "window=records") - - if("med_record") - var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message - - if(medmsg != null) - medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN) - medmsg = html_encode(medmsg) - - med_record = medmsg - SetRecords(user) - - if("sec_record") - var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message - - if(secmsg != null) - secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN) - secmsg = html_encode(secmsg) - - sec_record = secmsg - SetRecords(user) - if("limbs") var/limb_name = input(user, "Which limb do you want to change?") as null|anything in list("Left Leg","Right Leg","Left Arm","Right Arm","Left Foot","Right Foot","Left Hand","Right Hand") if(!limb_name) return @@ -1139,6 +1147,8 @@ datum/preferences character.dna.real_name = character.real_name character.flavor_text = flavor_text + character.med_record = med_record + character.sec_record = sec_record character.gender = gender diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 21314fcc301..135680dbc8c 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 3aeaa24ca7d..6375e7ce72b 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ