Skip to content

Commit

Permalink
[MIRROR] allow examining of items people are wearing
Browse files Browse the repository at this point in the history
  • Loading branch information
MuckerMayhem authored and SierraHelper committed Sep 21, 2023
1 parent 4ad7172 commit ea9a0cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,8 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
var/ID = GetIdCard()
if(ID)
. += " <a href='?src=\ref[ID];look_at_id=1'>\[Look at ID\]</a>"
else
. += " <a href='?src=\ref[src];examine=1'>\[?\]</a>"

/obj/item/proc/on_active_hand(mob/M)

Expand Down Expand Up @@ -951,3 +953,10 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/// Virtual for behavior to do after successful do_after if equip_delay is set
/obj/item/proc/equip_delay_after(mob/user, slot, equip_flags)
return

/obj/item/OnTopic(href, href_list, datum/topic_state/state)
. = ..()

if (href_list["examine"])
examinate(usr, src)
return TOPIC_HANDLED
4 changes: 3 additions & 1 deletion code/modules/clothing/_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@
return STATUS_INTERACTIVE

/obj/item/clothing/OnTopic(user, list/href_list, datum/topic_state/state)
. = ..()

if(href_list["list_ungabunga"])
var/list/visible = get_visible_accessories()
if (length(visible))
var/list/display = list()
for (var/obj/item/clothing/accessory/A in visible)
if (!(A.accessory_flags & ACCESSORY_HIDDEN))
display += "[icon2html(A, user)] \a [A]"
display += "[icon2html(A, user)] \a [A]<a href='?src=\ref[A];examine=1'>\[?\]</a>"
to_chat(user, "Attached to \the [src] are [english_list(display)].")
return TOPIC_HANDLED
if(href_list["list_armor_damage"])
Expand Down

0 comments on commit ea9a0cc

Please sign in to comment.