From d97b09f834b574e199f70c095599b7d540eb9d38 Mon Sep 17 00:00:00 2001 From: Farie82 Date: Thu, 17 Feb 2022 09:38:31 +0100 Subject: [PATCH] Hides the contents of the PDA slot in the strip menu (#17383) --- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/living/living.dm | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 05125331d6a..eafecdd4d2f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -396,7 +396,7 @@ dat += "Right (Empty)" dat += "" dat += " ↳ID:[(wear_id && !(wear_id.flags&ABSTRACT)) ? html_encode(wear_id) : "Empty"]" - dat += " ↳PDA:[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? html_encode(wear_pda) : "Empty"]" + dat += " ↳PDA:[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? "Full" : "Empty"]" if(istype(w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = w_uniform diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 6af1c3f1a5e..5ce7ece322a 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -770,15 +770,24 @@ /mob/living/proc/check_ear_prot() +/** + * Returns the name override, if any, for the slot somebody is trying to strip + */ +/mob/living/proc/get_strip_slot_name_override(slot) + switch(slot) + if(slot_wear_pda) + return "PDA" + // The src mob is trying to strip an item from someone // Override if a certain type of mob should be behave differently when stripping items (can't, for example) /mob/living/stripPanelUnequip(obj/item/what, mob/who, where, silent = 0) + var/item_name = get_strip_slot_name_override(where) || what.name if(what.flags & NODROP) - to_chat(src, "You can't remove \the [what.name], it appears to be stuck!") + to_chat(src, "You can't remove \the [item_name], it appears to be stuck!") return if(!silent) - who.visible_message("[src] tries to remove [who]'s [what.name].", \ - "[src] tries to remove [who]'s [what.name].") + who.visible_message("[src] tries to remove [who]'s [item_name].", \ + "[src] tries to remove [who]'s [item_name].") what.add_fingerprint(src) if(do_mob(src, who, what.strip_delay)) if(what && what == who.get_item_by_slot(where) && Adjacent(who))