From 83e153941927d3be953d20242479f0309b8abe73 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Sat, 3 Aug 2024 00:21:57 +0100 Subject: [PATCH] test --- code/__DEFINES/hud.dm | 4 ++++ code/modules/admin/verbs/mentorhud.dm | 10 +++++----- code/modules/mob/living/carbon/human/human_defines.dm | 2 +- .../mob/living/carbon/human/powers/human_powers.dm | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index deee80c7a91d..1c261bf9d3ca 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -25,3 +25,7 @@ #define NOTIFY_JOIN_XENO "join_xeno" #define NOTIFY_XENO_TACMAP "xeno_tacmap" #define NOTIFY_USCM_TACMAP "uscm_tacmap" + +#define INHERENT_HUD_MEDICAL "med" +#define INHERENT_HUD_SECURITY "sec" +#define INHERENT_HUD_NEW_PLAYER "new" diff --git a/code/modules/admin/verbs/mentorhud.dm b/code/modules/admin/verbs/mentorhud.dm index 7115b9b7189f..d0bbc7c59554 100644 --- a/code/modules/admin/verbs/mentorhud.dm +++ b/code/modules/admin/verbs/mentorhud.dm @@ -39,20 +39,20 @@ if(!ishuman(mentor)) to_chat(src, SPAN_WARNING("You cannot use this power as a non-human!")) return FALSE - if(!mentor.looc_overhead) + + if(!mentor.looc_overhead && !(mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER])) to_chat(src, SPAN_WARNING("You are not in a mentor role! (Overhead LOOC is disabled!)")) return FALSE var/datum/mob_hud/the_hud - var/chosen_HUD = 3 the_hud = GLOB.huds[MOB_HUD_NEW_PLAYER] - if(mentor.inherent_huds_toggled[chosen_HUD]) - mentor.inherent_huds_toggled[chosen_HUD] = FALSE + if(mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER]) + mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER] = FALSE the_hud.remove_hud_from(mentor, mentor) to_chat(mentor, SPAN_INFO("New Player Markers Disabled")) else - mentor.inherent_huds_toggled[chosen_HUD] = TRUE + mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER] = TRUE the_hud.add_hud_to(mentor, mentor) to_chat(mentor, SPAN_INFO("New Player Markers Enabled")) return TRUE diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 4baf7943d984..5c5ad94031ea 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -147,7 +147,7 @@ /// A list of all the shrapnel currently embedded in the human var/list/atom/movable/embedded_items = list() - var/list/inherent_huds_toggled = list(FALSE,FALSE, FALSE) + var/list/inherent_huds_toggled = list(INHERENT_HUD_MEDICAL = FALSE, INHERENT_HUD_SECURITY = FALSE, INHERENT_HUD_NEW_PLAYER = FALSE) var/default_lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE diff --git a/code/modules/mob/living/carbon/human/powers/human_powers.dm b/code/modules/mob/living/carbon/human/powers/human_powers.dm index e9d98dbee6b7..663e3273d5a4 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -270,13 +270,13 @@ return var/datum/mob_hud/the_hud - var/chosen_HUD = 1 + var/chosen_HUD = INHERENT_HUD_MEDICAL switch(hud_choice) if("Medical HUD") the_hud = GLOB.huds[MOB_HUD_MEDICAL_ADVANCED] if("Security HUD") the_hud = GLOB.huds[MOB_HUD_SECURITY_ADVANCED] - chosen_HUD = 2 + chosen_HUD = INHERENT_HUD_SECURITY else return