Hides the contents of the PDA slot in the strip menu (#17383)

This commit is contained in:
Farie82
2022-02-17 09:38:31 +01:00
committed by GitHub
parent 6700097576
commit d97b09f834
2 changed files with 13 additions and 4 deletions
@@ -396,7 +396,7 @@
dat += "<font color=grey>Right (Empty)</font>"
dat += "</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>ID:</B></td><td><A href='?src=[UID()];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags&ABSTRACT)) ? html_encode(wear_id) : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>PDA:</B></td><td><A href='?src=[UID()];item=[slot_wear_pda]'>[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? html_encode(wear_pda) : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>PDA:</B></td><td><A href='?src=[UID()];item=[slot_wear_pda]'>[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? "Full" : "<font color=grey>Empty</font>"]</A></td></tr>"
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
+12 -3
View File
@@ -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, "<span class='warning'>You can't remove \the [what.name], it appears to be stuck!</span>")
to_chat(src, "<span class='warning'>You can't remove \the [item_name], it appears to be stuck!</span>")
return
if(!silent)
who.visible_message("<span class='danger'>[src] tries to remove [who]'s [what.name].</span>", \
"<span class='userdanger'>[src] tries to remove [who]'s [what.name].</span>")
who.visible_message("<span class='danger'>[src] tries to remove [who]'s [item_name].</span>", \
"<span class='userdanger'>[src] tries to remove [who]'s [item_name].</span>")
what.add_fingerprint(src)
if(do_mob(src, who, what.strip_delay))
if(what && what == who.get_item_by_slot(where) && Adjacent(who))