From 8254bbbe1e4ab2329da2a3c031cbd1c70bae1f1f Mon Sep 17 00:00:00 2001 From: Odairu <39929315+Odairu@users.noreply.github.com> Date: Thu, 8 Aug 2024 07:13:39 -0400 Subject: [PATCH] [non-modular] Adds a new trait for the basic security hud and cleans up the secmed glasses in tandum with that (#1920) ## About The Pull Request does as title says ## Why It's Good For The Game players won't notice but code looks better ## Proof Of Testing ![image](https://github.com/user-attachments/assets/aa2edc6d-7ea8-41c1-b03d-1e614b678a33) ## Changelog :cl: code: changed basic sec hud into a trait /:cl: --- code/__DEFINES/~~bubber_defines/traits.dm | 3 +++ code/datums/hud.dm | 1 + .../modules/security/secmed/security_medic.dm | 17 +---------------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/code/__DEFINES/~~bubber_defines/traits.dm b/code/__DEFINES/~~bubber_defines/traits.dm index b291679dfad..6d61715d220 100644 --- a/code/__DEFINES/~~bubber_defines/traits.dm +++ b/code/__DEFINES/~~bubber_defines/traits.dm @@ -13,3 +13,6 @@ //For the hemophage quirk that allows hemophages to eat/drink normal food/drink. #define TRAIT_MASQUERADE_FOOD "masquerade_food" + +//basic security hud +#define TRAIT_BASIC_SECURITY_HUD "basic_security_hud" diff --git a/code/datums/hud.dm b/code/datums/hud.dm index 4537a4ada7e..ca0a9d43520 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -28,6 +28,7 @@ GLOBAL_LIST_INIT(trait_to_hud, list( TRAIT_DIAGNOSTIC_HUD = DATA_HUD_DIAGNOSTIC, TRAIT_BOT_PATH_HUD = DATA_HUD_BOT_PATH, // SKYRAT EDIT CHANGE TRAIT_PERMIT_HUD = DATA_HUD_PERMIT, // SKYRAT EDIT ADDITION + TRAIT_BASIC_SECURITY_HUD = DATA_HUD_SECURITY_BASIC // BUBBER EDIT ADDITION )) /datum/atom_hud diff --git a/modular_zubbers/code/modules/security/secmed/security_medic.dm b/modular_zubbers/code/modules/security/secmed/security_medic.dm index b4c1c728dd1..78e8a197e45 100644 --- a/modular_zubbers/code/modules/security/secmed/security_medic.dm +++ b/modular_zubbers/code/modules/security/secmed/security_medic.dm @@ -100,22 +100,7 @@ icon = 'modular_zubbers/code/modules/security/secmed/icons/secmed_equipment.dmi' icon_state = "hud" worn_icon_state = "healthhud" - clothing_traits = list(TRAIT_MEDICAL_HUD) - -/obj/item/clothing/glasses/hud/secmed/equipped(mob/living/carbon/human/user, slot) - . = ..() - if(!(slot & ITEM_SLOT_EYES)) - return - // Extra hud because the bloody code doesn't support multihuds yet. I'll probably add multihud support soon enough. If you see this I didn't. ~Waterpig - var/datum/atom_hud/extra_hud = GLOB.huds[DATA_HUD_SECURITY_BASIC] - extra_hud.show_to(user) - -/obj/item/clothing/glasses/hud/secmed/dropped(mob/living/carbon/human/user) - . = ..() - if(!istype(user) || user.glasses != src) - return - var/datum/atom_hud/extra_hud = GLOB.huds[DATA_HUD_SECURITY_BASIC] - extra_hud.hide_from(user) + clothing_traits = list(TRAIT_MEDICAL_HUD, TRAIT_BASIC_SECURITY_HUD) /obj/item/clothing/glasses/hud/secmed/sunglasses name = "security-medical HUD sunglasses"