From 078824266ea943a6dd420396769be5cf4d6a2b10 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 17 Jun 2017 16:56:48 -0500 Subject: [PATCH] Tablets with IDs in them now show the ID's name on examine --- code/modules/mob/living/carbon/human/human_helpers.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 0620ebd062..e7cfd666de 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -66,12 +66,21 @@ var/obj/item/weapon/storage/wallet/wallet = wear_id var/obj/item/device/pda/pda = wear_id var/obj/item/weapon/card/id/id = wear_id + var/obj/item/device/modular_computer/tablet/tablet = wear_id if(istype(wallet)) id = wallet.front_id if(istype(id)) . = id.registered_name else if(istype(pda)) . = pda.owner + else if(istype(tablet)) + var/obj/item/weapon/computer_hardware/card_slot/card_slot = tablet.all_components[MC_CARD] + if(card_slot && (card_slot.stored_card2 || card_slot.stored_card)) + if(card_slot.stored_card2) //The second card is the one used for authorization in the ID changing program, so we prioritize it here for consistency + . = card_slot.stored_card2.registered_name + else + if(card_slot.stored_card) + . = card_slot.stored_card.registered_name if(!.) . = if_no_id //to prevent null-names making the mob unclickable return