mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 08:06:33 +01:00
More things use trait huds over raw hud management (#93084)
This commit is contained in:
@@ -340,15 +340,17 @@ ADMIN_VERB(combo_hud, R_ADMIN, "Toggle Combo HUD", "Toggles the Admin Combo HUD.
|
||||
log_admin("[key_name(user)] toggled their admin combo HUD [user.combo_hud_enabled ? "ON" : "OFF"].")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Combo HUD", "[user.combo_hud_enabled ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
|
||||
|
||||
/// List of hud traits in the admin combo hud
|
||||
#define ADMIN_HUDS list(TRAIT_SECURITY_HUD, TRAIT_MEDICAL_HUD, TRAIT_DIAGNOSTIC_HUD, TRAIT_BOT_PATH_HUD)
|
||||
|
||||
/client/proc/enable_combo_hud()
|
||||
if (combo_hud_enabled)
|
||||
return
|
||||
|
||||
combo_hud_enabled = TRUE
|
||||
|
||||
for (var/hudtype in list(DATA_HUD_SECURITY_ADVANCED, DATA_HUD_MEDICAL_ADVANCED, DATA_HUD_DIAGNOSTIC, DATA_HUD_BOT_PATH))
|
||||
var/datum/atom_hud/atom_hud = GLOB.huds[hudtype]
|
||||
atom_hud.show_to(mob)
|
||||
for (var/hudtrait in ADMIN_HUDS)
|
||||
ADD_TRAIT(mob, hudtrait, ADMIN_TRAIT)
|
||||
|
||||
for (var/datum/atom_hud/alternate_appearance/basic/antagonist_hud/antag_hud in GLOB.active_alternate_appearances)
|
||||
antag_hud.show_to(mob)
|
||||
@@ -362,9 +364,8 @@ ADMIN_VERB(combo_hud, R_ADMIN, "Toggle Combo HUD", "Toggles the Admin Combo HUD.
|
||||
|
||||
combo_hud_enabled = FALSE
|
||||
|
||||
for (var/hudtype in list(DATA_HUD_SECURITY_ADVANCED, DATA_HUD_MEDICAL_ADVANCED, DATA_HUD_DIAGNOSTIC, DATA_HUD_BOT_PATH))
|
||||
var/datum/atom_hud/atom_hud = GLOB.huds[hudtype]
|
||||
atom_hud.hide_from(mob)
|
||||
for (var/hudtrait in ADMIN_HUDS)
|
||||
REMOVE_TRAIT(mob, hudtrait, ADMIN_TRAIT)
|
||||
|
||||
for (var/datum/atom_hud/alternate_appearance/basic/antagonist_hud/antag_hud in GLOB.active_alternate_appearances)
|
||||
antag_hud.hide_from(mob)
|
||||
@@ -372,6 +373,8 @@ ADMIN_VERB(combo_hud, R_ADMIN, "Toggle Combo HUD", "Toggles the Admin Combo HUD.
|
||||
mob.lighting_cutoff = mob.default_lighting_cutoff()
|
||||
mob.update_sight()
|
||||
|
||||
#undef ADMIN_HUDS
|
||||
|
||||
ADMIN_VERB(show_traitor_panel, R_ADMIN, "Show Traitor Panel", "Edit mobs's memory and role", ADMIN_CATEGORY_GAME, mob/target_mob)
|
||||
var/datum/mind/target_mind = target_mob.mind
|
||||
if(!target_mind)
|
||||
|
||||
Reference in New Issue
Block a user