mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 17:07:53 +01:00
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:
@@ -95,7 +95,7 @@
|
||||
. = ..()
|
||||
if(LAZYLEN(accessories))
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
to_chat(user, "\A [A] [A.gender == PLURAL ? "are" : "is"] attached to it.")
|
||||
to_chat(user, SPAN_NOTICE("<a HREF=?src=\ref[user];lookitem=\ref[A]>\A [A]</a> [A.gender == PLURAL ? "are" : "is"] attached to it."))
|
||||
|
||||
/obj/item/clothing/proc/update_accessory_slowdown()
|
||||
slowdown_accessory = 0
|
||||
|
||||
@@ -610,12 +610,18 @@
|
||||
|
||||
//TODO: Fix Topic vulnerabilities for malfunction and AI override.
|
||||
/obj/item/rig/Topic(href,href_list)
|
||||
if(href_list["examine_fluff"])
|
||||
examine_fluff(usr)
|
||||
if(ismob(href))
|
||||
do_rig_thing(href, href_list)
|
||||
return
|
||||
do_rig_thing(usr, 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)
|
||||
if(href_list["examine_fluff"])
|
||||
examine_fluff(usr)
|
||||
if(ismob(href))
|
||||
do_rig_thing(href, href_list)
|
||||
return
|
||||
do_rig_thing(usr, href_list)
|
||||
|
||||
/obj/item/rig/proc/do_rig_thing(mob/user, var/list/href_list)
|
||||
if(!check_suit_access(user))
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/datum/tgui_module/armor_values
|
||||
var/armor_name = ""
|
||||
var/list/armor_values = list()
|
||||
|
||||
/datum/tgui_module/armor_values/New(mob/user, var/set_armor_name, var/list/set_armor_values)
|
||||
..()
|
||||
armor_name = set_armor_name
|
||||
armor_values = set_armor_values
|
||||
|
||||
/datum/tgui_module/armor_values/ui_interact(var/mob/user, var/datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "ArmorValues", armor_name, 500, 400)
|
||||
ui.autoupdate = FALSE
|
||||
ui.open()
|
||||
|
||||
/datum/tgui_module/armor_values/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["armor_values"] = armor_values
|
||||
return data
|
||||
Reference in New Issue
Block a user