From 4bc66841c11d9a5e469cb5c4291aa7344cb3e4de Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:37:15 -0400 Subject: [PATCH] icon magic (#1029) --- code/_onclick/hud/hud.dm | 6 ++++++ code/_onclick/hud/screen_objects.dm | 4 ++++ code/game/objects/items/cards_ids.dm | 11 +++++++++-- code/modules/mob/mob.dm | 24 ++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 8fd637b9df81..5daca490f47e 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -89,6 +89,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list( var/atom/movable/screen/holomap/holomap_container var/atom/movable/screen/progbar_container/use_timer + var/atom/movable/screen/vis_holder/vis_holder // subtypes can override this to force a specific UI style var/ui_style @@ -126,6 +127,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list( owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness) holomap_container = new(null, src) + vis_holder = new(null, src) RegisterSignal(mymob, COMSIG_VIEWDATA_UPDATE, PROC_REF(on_viewdata_update)) @@ -159,6 +161,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list( QDEL_LIST(hotkeybuttons) throw_icon = null QDEL_LIST(infodisplay) + QDEL_NULL(vis_holder) healths = null stamina = null @@ -271,6 +274,9 @@ GLOBAL_LIST_INIT(available_ui_styles, list( if(holomap_container) screenmob.client.screen += holomap_container + if(vis_holder) + screenmob.client.screen += vis_holder + hud_version = display_hud_version update_gunpoint(screenmob) persistent_inventory_update(screenmob) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index f1c5127195f9..64645f246597 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -1025,3 +1025,7 @@ // We offset them by half the size on each axis to center them. // We need to account for this object being 32x32, so we subtract 32 from the initial 480 before dividing screen_loc = "CENTER:-224,CENTER:-224" + +/atom/movable/screen/vis_holder + icon = "" + invisibility = INVISIBILITY_MAXIMUM diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index dca4bdac9152..d27622580851 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -465,6 +465,11 @@ . += HAS_TRAIT(src, TRAIT_JOB_FIRST_ID_CARD) ? span_boldnotice("Hmm... yes, this ID was issued from Central Command!") : span_boldnotice("This ID was created in this sector, not by Central Command.") /obj/item/card/id/proc/show(mob/user) + set waitfor = FALSE + + var/atom/movable/screen/front_container = user.send_appearance(front_image) + var/atom/movable/screen/side_container = user.send_appearance(side_image) + var/list/content = list("
")
content += "Name: [registered_name] " content += "Age: [registered_age] " @@ -472,15 +477,17 @@ content += "Blood Type: [blood_type] " content += "Fingerprint: [fingerprint] " content += "DNA Hash: [dna_hash] " + if(front_image && side_image) - content +=" | Photo: | "
+ content +="Photo: | "
content += "