From b49c1c49e5faa219956b8d8ecf1296b72f447134 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 20 Aug 2022 12:32:37 -0700 Subject: [PATCH 1/3] Update security_officer.dm --- code/modules/jobs/job_types/security_officer.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/jobs/job_types/security_officer.dm b/code/modules/jobs/job_types/security_officer.dm index f5d64b101a..cd3612136e 100644 --- a/code/modules/jobs/job_types/security_officer.dm +++ b/code/modules/jobs/job_types/security_officer.dm @@ -35,11 +35,14 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)) -/datum/job/officer/after_spawn(mob/living/carbon/human/H, mob/M) +/datum/job/officer/after_spawn(mob/living/spawned, client/player_client, latejoin = FALSE) . = ..() + if(!ishuman(spawned)) + return + var/mob/living/carbon/human/H = spawned // Assign department security var/department - if(M && M.client && M.client.prefs) + if(player_client?.prefs) department = M.client.prefs.prefered_security_department if(!LAZYLEN(GLOB.available_depts) || department == "None") return From 5a32c5ec40c2e652aaa1db3c8cc803dfdd611503 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 20 Aug 2022 13:07:53 -0700 Subject: [PATCH 2/3] Update security_officer.dm --- code/modules/jobs/job_types/security_officer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/jobs/job_types/security_officer.dm b/code/modules/jobs/job_types/security_officer.dm index cd3612136e..d0367a8cd6 100644 --- a/code/modules/jobs/job_types/security_officer.dm +++ b/code/modules/jobs/job_types/security_officer.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S // Assign department security var/department if(player_client?.prefs) - department = M.client.prefs.prefered_security_department + department = player_client.prefs.prefered_security_department if(!LAZYLEN(GLOB.available_depts) || department == "None") return else if(department in GLOB.available_depts) From 27c404abd2b71c206d40bc7af208d1b905a7d114 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 21 Aug 2022 03:13:47 -0700 Subject: [PATCH 3/3] Update security_officer.dm --- code/modules/jobs/job_types/security_officer.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/jobs/job_types/security_officer.dm b/code/modules/jobs/job_types/security_officer.dm index d0367a8cd6..77cf04cbf7 100644 --- a/code/modules/jobs/job_types/security_officer.dm +++ b/code/modules/jobs/job_types/security_officer.dm @@ -111,11 +111,9 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S else break if(department) - to_chat(M, "You have been assigned to [department]!") + to_chat(H, "You have been assigned to [department]!") else - to_chat(M, "You have not been assigned to any department. Patrol the halls and help where needed.") - - + to_chat(H, "You have not been assigned to any department. Patrol the halls and help where needed.") /datum/outfit/job/security name = "Security Officer"