Properly defines a few global vars (#7948)

Co-authored-by: Selis <selis@xynolabs.com>
This commit is contained in:
Raeschen
2024-03-27 23:55:55 +01:00
committed by GitHub
parent 2fbb251fca
commit 29b08a0d33
21 changed files with 92 additions and 88 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>")