[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>
This commit is contained in:
SkyratBot
2024-02-26 21:14:20 +01:00
committed by GitHub
co-authored by _0Steven
parent 6c5b65120e
commit 6e26be94d3
2 changed files with 17 additions and 0 deletions
+11
View File
@@ -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
@@ -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))