Properly defines a few global vars (#7938)

This commit is contained in:
Selis
2024-03-12 14:11:01 +01:00
committed by GitHub
parent 193e5b8feb
commit 24c3099b57
21 changed files with 97 additions and 93 deletions

View File

@@ -1,13 +1,15 @@
var/global_vantag_hud = 0
GLOBAL_VAR_INIT(global_vantag_hud, 0)
/client/proc/toggle_vantag_hud_global(var/mob/target as mob)
/client/proc/toggle_vantag_hud_global(mob/target as mob)
set category = "Fun"
set name = "Toggle Global Event HUD"
set desc = "Give everyone the Event HUD."
global_vantag_hud = !global_vantag_hud
if(global_vantag_hud)
GLOB.global_vantag_hud = !GLOB.global_vantag_hud
if(GLOB.global_vantag_hud)
for(var/mob/living/L in living_mob_list)
if(L.ckey)
L.vantag_hud = TRUE
L.recalculate_vis()
L.recalculate_vis()
to_chat(src, "<span class='warning'>Global Event HUD has been turned [GLOB.global_vantag_hud ? "on" : "off"].</span>")