From f581ee258cf2a5263745bfb8dae0c121b98bad82 Mon Sep 17 00:00:00 2001 From: Chiefwaffles Date: Tue, 7 Jul 2015 16:30:37 -0700 Subject: [PATCH] Underlings are now told who their head is When heads are present at roundstart, or latejoin the round, all their alive underlings will be notified. --- code/controllers/subsystem/jobs.dm | 1 + code/game/jobs/job/captain.dm | 2 ++ code/game/jobs/job/engineering.dm | 2 ++ code/game/jobs/job/job.dm | 11 ++++++++++- code/game/jobs/job/medical.dm | 2 ++ code/game/jobs/job/science.dm | 2 ++ code/game/jobs/job/security.dm | 2 ++ html/changelogs/Chiefwaffles-Who_is_my_boss.yml | 6 ++++++ 8 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/Chiefwaffles-Who_is_my_boss.yml diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index 5f85d3f162c..c8495566dd4 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -390,6 +390,7 @@ var/datum/subsystem/job/SSjob else //We ran out of spare locker spawns! break + /datum/subsystem/job/proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist if(!config.load_jobs_from_txt) return 0 diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index f94c21e1d2f..5a2c960e1ea 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -95,3 +95,5 @@ Head of Personnel else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(H), slot_in_backpack) + + announce_head(H.mind) //tell underlings they have a head \ No newline at end of file diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 8c8c69ce873..7ec90b356c1 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -42,6 +42,8 @@ Chief Engineer if(H.backbag == 2 || H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(H), slot_in_backpack) + announce_head(H.mind) //tell underlings they have a head + /* Station Engineer */ diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 93c43bd653d..773d861feda 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -171,4 +171,13 @@ return max(0, minimal_player_age - C.player_age) /datum/job/proc/config_check() - return 1 \ No newline at end of file + return 1 + +/datum/job/proc/announce_head(var/datum/mind/o_mind) //Announces to underlings of the mind's assigned job that the mind is their head. + for(var/datum/mind/p_mind in ticker.minds) + if(p_mind.current && p_mind.current.stat != DEAD) + var/datum/job/p_job = SSjob.GetJob(p_mind.assigned_role) + if(p_job.department_head) + for(var/head in p_job.department_head) + if(head == o_mind.assigned_role) + p_mind.current << "[o_mind.name] is your department head! " \ No newline at end of file diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 6e11a228224..698401ecc9c 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -38,6 +38,8 @@ Chief Medical Officer if(H.backbag == 2 || H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(H), slot_in_backpack) + announce_head(H.mind) //tell underlings they have a head + /* Medical Doctor */ diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 27451f9dedd..e57f6903bde 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -40,6 +40,8 @@ Research Director if(H.backbag == 2 || H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(H), slot_in_backpack) + announce_head(H.mind) //tell underlings they have a head + /* Scientist */ diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 12c9fec1d69..6daa0d5a3b0 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -55,6 +55,8 @@ Head of Security L.implanted = 1 H.sec_hud_set_implants() + announce_head(H.mind) //tell underlings they have a head + /* Warden */ diff --git a/html/changelogs/Chiefwaffles-Who_is_my_boss.yml b/html/changelogs/Chiefwaffles-Who_is_my_boss.yml new file mode 100644 index 00000000000..4cc98fd9d8e --- /dev/null +++ b/html/changelogs/Chiefwaffles-Who_is_my_boss.yml @@ -0,0 +1,6 @@ +author: Chiefwaffles + +delete-after: True + +changes: + - rscadd: "Department Heads, on arrival, (latejoin or start) now have their name announced to their underlings."