From 6e26be94d37450fdc5bc280c4ea040b2e35b04d9 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:14:20 +0100 Subject: [PATCH] [MIRROR] Alternate job titles (chef, department security) actually imprint this title onto your PDA (#26611) * Alternate job titles (chef, department security) actually imprint this title onto your PDA (#81602) * Alternate job titles (chef, department security) actually imprint this title onto your PDA --------- Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> --- code/modules/jobs/job_types/cook.dm | 11 +++++++++++ code/modules/jobs/job_types/security_officer.dm | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/code/modules/jobs/job_types/cook.dm b/code/modules/jobs/job_types/cook.dm index e96bae827fa..2be7bba5154 100644 --- a/code/modules/jobs/job_types/cook.dm +++ b/code/modules/jobs/job_types/cook.dm @@ -88,6 +88,17 @@ if(!visualsOnly) other_chefs.cooks++ +/datum/outfit/job/cook/post_equip(mob/living/carbon/human/user, visualsOnly = FALSE) + . = ..() + // Update PDA to match possible new trim. + var/obj/item/card/id/worn_id = user.wear_id + var/obj/item/modular_computer/pda/pda = user.get_item_by_slot(pda_slot) + if(!istype(worn_id) || !istype(pda)) + return + var/assignment = worn_id.get_trim_assignment() + if(!isnull(assignment)) + pda.imprint_id(user.real_name, assignment) + /datum/outfit/job/cook/get_types_to_preload() . = ..() . += /obj/item/clothing/suit/apron/chef diff --git a/code/modules/jobs/job_types/security_officer.dm b/code/modules/jobs/job_types/security_officer.dm index ae71ba04e0f..6f8a5487342 100644 --- a/code/modules/jobs/job_types/security_officer.dm +++ b/code/modules/jobs/job_types/security_officer.dm @@ -125,6 +125,12 @@ GLOBAL_LIST_EMPTY(security_officer_distribution) SSid_access.apply_trim_to_card(worn_id, dep_trim) spawning.sec_hud_set_ID() + // Update PDA to match new trim. + var/obj/item/modular_computer/pda/pda = spawning.get_item_by_slot(ITEM_SLOT_BELT) + var/assignment = worn_id.get_trim_assignment() + if(istype(pda) && !isnull(assignment)) + pda.imprint_id(spawning.real_name, assignment) + var/spawn_point = pick(LAZYACCESS(GLOB.department_security_spawns, department)) if(!CONFIG_GET(flag/sec_start_brig) && (destination || spawn_point))