From 81a8829dbc12e35cc4aba5c78a2ed3707dcd1a10 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Wed, 12 Nov 2025 17:12:07 +0100 Subject: [PATCH] bridge assistant and veteran advisor PDAs (inside backpack) are now imprinted automatically (#93850) --- code/modules/jobs/job_types/_job.dm | 21 ++++++++++++------- code/modules/jobs/job_types/prisoner.dm | 1 + .../station_trait/bridge_assistant.dm | 1 + .../station_trait/veteran_advisor.dm | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index a7e22b570d1..114531f70c9 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -413,18 +413,25 @@ equipped.update_ID_card() + if(!pda_slot) //This job outfit doesn't have a PDA. + return + var/obj/item/modular_computer/pda/pda = equipped.get_item_by_slot(pda_slot) + if(pda && !istype(pda)) //we found something but it isn't a PDA, check if it's inside it instead. + pda = locate() in pda - if(istype(pda)) - pda.imprint_id(equipped.real_name, equipped_job.title) - pda.update_ringtone(equipped_job.job_tone) - pda.UpdateDisplay() + if(!istype(pda)) //We couldn't find a PDA at all. + stack_trace("pda_slot was set but we couldn't find a PDA!") + return - var/client/equipped_client = GLOB.directory[ckey(equipped.mind?.key)] + pda.imprint_id(equipped.real_name, equipped_job.title) + pda.update_ringtone(equipped_job.job_tone) + pda.UpdateDisplay() - if(equipped_client) - pda.update_pda_prefs(equipped_client) + var/client/equipped_client = GLOB.directory[ckey(equipped.mind?.key)] + if(equipped_client) + pda.update_pda_prefs(equipped_client) /datum/outfit/job/get_chameleon_disguise_info() var/list/types = ..() diff --git a/code/modules/jobs/job_types/prisoner.dm b/code/modules/jobs/job_types/prisoner.dm index 155b75e98cb..bfa28f824ee 100644 --- a/code/modules/jobs/job_types/prisoner.dm +++ b/code/modules/jobs/job_types/prisoner.dm @@ -60,6 +60,7 @@ ears = null shoes = /obj/item/clothing/shoes/sneakers/orange box = /obj/item/storage/box/survival/prisoner + pda_slot = null /datum/outfit/job/prisoner/pre_equip(mob/living/carbon/human/H) ..() diff --git a/code/modules/jobs/job_types/station_trait/bridge_assistant.dm b/code/modules/jobs/job_types/station_trait/bridge_assistant.dm index 5088fa87b3a..e3addf59313 100644 --- a/code/modules/jobs/job_types/station_trait/bridge_assistant.dm +++ b/code/modules/jobs/job_types/station_trait/bridge_assistant.dm @@ -80,3 +80,4 @@ shoes = /obj/item/clothing/shoes/laceup l_pocket = /obj/item/gun/energy/e_gun/mini r_pocket = /obj/item/assembly/flash/handheld + pda_slot = ITEM_SLOT_BACK diff --git a/code/modules/jobs/job_types/station_trait/veteran_advisor.dm b/code/modules/jobs/job_types/station_trait/veteran_advisor.dm index 3172155dc96..6bd84ce0c0f 100644 --- a/code/modules/jobs/job_types/station_trait/veteran_advisor.dm +++ b/code/modules/jobs/job_types/station_trait/veteran_advisor.dm @@ -83,3 +83,4 @@ r_hand = /obj/item/cane implants = list(/obj/item/implant/mindshield) + pda_slot = ITEM_SLOT_BACK