Examinable Armor (#17364)

* Examinable Armor

* horse react this linter

* me coder

* changes

* Update tgui/packages/tgui/interfaces/ArmorValues.tsx

Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>

* capitalize

* cl newline

---------

Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
Geeves
2023-09-26 19:12:00 +00:00
committed by GitHub
co-authored by Matt Atlas
parent ff18f82ef6
commit 2c46ef8a4d
7 changed files with 96 additions and 8 deletions
+11 -1
View File
@@ -333,8 +333,18 @@
//Changed this switch to ranges instead of tiered values, to cope with granularity and also
//things outside its range ~Nanako
. = ..(user, distance, "", "It is a [size] item.")
if(length(armor))
to_chat(user, FONT_SMALL(SPAN_NOTICE("\[?\] This item has armor values. <a href=?src=\ref[src];examine_armor=1>\[Show Armor Values\]</a>")))
return ..(user, distance, "", "It is a [size] item.")
/obj/item/Topic(href, href_list)
if(href_list["examine_armor"])
var/list/armor_details = list()
for(var/armor_type in armor)
armor_details[armor_type] = armor[armor_type]
var/datum/tgui_module/armor_values/AV = new /datum/tgui_module/armor_values(usr, capitalize_first_letters(name), armor_details)
AV.ui_interact(usr)
return ..()
/obj/item/attack_hand(mob/user)
if(!user)