Port /tg/ stripping panel (#17842)

This commit is contained in:
ShadowLarkens
2025-06-12 07:37:24 -07:00
committed by GitHub
parent 7f04522f8d
commit 0db890840f
21 changed files with 205 additions and 39 deletions
+14 -8
View File
@@ -311,6 +311,11 @@
return TRUE
/datum/inventory_panel/human/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/simple/inventory)
)
/datum/inventory_panel/human/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = list() // We don't inherit TGUI data because humans are soooo different.
@@ -320,36 +325,37 @@
if(istype(H.w_uniform, /obj/item/clothing/under))
suit = H.w_uniform
var/list/slots = list()
for(var/entry in H.species.hud.gear)
var/list/slot_ref = H.species.hud.gear[entry]
if((slot_ref["slot"] in list(slot_l_store, slot_r_store)))
continue
var/obj/item/thing_in_slot = H.get_equipped_item(slot_ref["slot"])
slots.Add(list(list(
UNTYPED_LIST_ADD(slots, list(
"name" = slot_ref["name"],
"item" = thing_in_slot,
"icon" = thing_in_slot ? icon2base64(icon(thing_in_slot.icon, thing_in_slot.icon_state, frame = 1)) : null,
"act" = "targetSlot",
"params" = list("slot" = slot_ref["slot"]),
)))
))
data["slots"] = slots
var/list/specialSlots = list()
if(H.species.hud.has_hands)
specialSlots.Add(list(list(
UNTYPED_LIST_ADD(specialSlots, list(
"name" = "Left Hand",
"item" = H.l_hand,
"icon" = H.l_hand ? icon2base64(icon(H.l_hand.icon, H.l_hand.icon_state, frame = 1)) : null,
"act" = "targetSlot",
"params" = list("slot" = slot_l_hand),
)))
specialSlots.Add(list(list(
))
UNTYPED_LIST_ADD(specialSlots, list(
"name" = "Right Hand",
"item" = H.r_hand,
"icon" = H.r_hand ? icon2base64(icon(H.r_hand.icon, H.r_hand.icon_state, frame = 1)) : null,
"act" = "targetSlot",
"params" = list("slot" = slot_r_hand),
)))
))
data["specialSlots"] = specialSlots
data["internals"] = H.internals