Skip to content

Commit

Permalink
team hud for all (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayland-Smithy committed Jun 19, 2021
1 parent 131b324 commit 5a83125
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/modules/client/preferences_toggles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,20 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
to_chat(src, span_notice("You will no longer examine things you click on."))
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Inquisitiveness", "[prefs.inquisitive_ghost ? "Enabled" : "Disabled"]"))

#ifdef EVENTMODE
/client/verb/toggle_team_huds() //shameless copy from admin verbs
set name = "Toggle Team/Antag HUD"
set desc = "Toggles whether you see Arena Team and Antagonist HUDs"
set category = "Preferences"

var/adding_hud = !has_antag_hud()

for(var/datum/atom_hud/antag/H in GLOB.huds)
adding_hud ? H.add_hud_to(usr) : H.remove_hud_from(usr)

to_chat(usr, "Team HUDs [adding_hud ? "enabled" : "disabled"].")
#endif

//Admin Preferences
/client/proc/toggleadminhelpsound()
set name = "Hear/Silence Adminhelps"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_LOGIN, client)
client.init_verbs()

#ifdef EVENTMODE
if(!isnewplayer(src)) //skip newplayers so no lobby huds or runtimes when they get deleted, might be too hot here?
for(var/datum/atom_hud/antag/H in GLOB.huds)
H.add_hud_to(src) //enable antag/team huds by default
#endif

return TRUE


Expand Down

0 comments on commit 5a83125

Please sign in to comment.