From 9dc9d4726661de35499b105c5cd72ba350233fbc Mon Sep 17 00:00:00 2001 From: Mikhail Dzianishchyts Date: Tue, 26 Mar 2024 12:41:12 +0300 Subject: [PATCH] Show poll alert for admins anyway (#24817) * Show poll alert for admins anyway * Update comment --- code/_globalvars/lists/mob_lists.dm | 2 +- code/modules/mob/dead/observer/observer_base.dm | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/_globalvars/lists/mob_lists.dm b/code/_globalvars/lists/mob_lists.dm index 1080a8e31dc..c1533ef0fad 100644 --- a/code/_globalvars/lists/mob_lists.dm +++ b/code/_globalvars/lists/mob_lists.dm @@ -27,7 +27,7 @@ GLOBAL_LIST_EMPTY(non_respawnable_keys) //List of ckeys that are excluded from r GLOBAL_LIST_INIT(simple_animals, list(list(), list(), list(), list())) //One for each AI_* status define, List of all simple animals, including clientless GLOBAL_LIST_EMPTY(bots_list) //List of all bots(beepsky, medibots,etc) GLOBAL_LIST_EMPTY(roundstart_observer_keys) //List of ckeys who ghosted before the game began. -GLOBAL_LIST_EMPTY(antag_hud_users) // ckeys of (non-admin) users who have enabled ahud at some point during the game +GLOBAL_LIST_EMPTY(antag_hud_users) // ckeys of users who have enabled ahud at some point during the game GLOBAL_LIST_EMPTY(surgeries_list) GLOBAL_LIST_EMPTY(hear_radio_list) //Mobs that hear the radio even if there's no client diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm index 2c5640f1915..9bf21554c17 100644 --- a/code/modules/mob/dead/observer/observer_base.dm +++ b/code/modules/mob/dead/observer/observer_base.dm @@ -365,6 +365,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!check_rights((R_ADMIN | R_MOD), FALSE, user)) return antagHUD = TRUE + GLOB.antag_hud_users |= user.ckey for(var/datum/atom_hud/antag/H in GLOB.huds) H.add_hud_to(src) @@ -852,6 +853,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp * If allow_roundstart_observers is FALSE (TRUE by default), then any observers who were able to ahud due to joining roundstart will be excluded as well. */ /mob/dead/observer/proc/check_ahud_rejoin_eligibility(allow_roundstart_observers = TRUE) + if(check_rights(R_ADMIN | R_MOD, FALSE, src)) + return TRUE + if(!GLOB.configuration.general.restrict_antag_hud_rejoin || !has_ahudded()) return TRUE