Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] allow examining of items people are wearing #1051

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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