From fae52bae094d5cb6f1b4b03e8dceb24cdbac07ab Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Sun, 28 Apr 2024 14:34:42 -0400 Subject: [PATCH] [MIRROR] fix roleless poll ignores not working (#2223) * fix roleless poll ignores not working (#82911) Fixes https://github.com/tgstation/tgstation/issues/82890 In some cases an alert poll had no role, like the monkey helmet, and because of that it skipped the eligibility check ## Changelog :cl: fix: All alert polls ignore option works /:cl: * fix roleless poll ignores not working --------- Co-authored-by: 13spacemen <46101244+13spacemen@users.noreply.github.com> --- code/controllers/subsystem/polling.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/controllers/subsystem/polling.dm b/code/controllers/subsystem/polling.dm index 1495e48c7ab..5e7ee0fb0f4 100644 --- a/code/controllers/subsystem/polling.dm +++ b/code/controllers/subsystem/polling.dm @@ -79,13 +79,13 @@ SUBSYSTEM_DEF(polling) for(var/mob/candidate_mob as anything in group) if(!candidate_mob.client) continue - // Universal opt-out for all players if it's for a role. - if(role && (!candidate_mob.client.prefs.read_preference(/datum/preference/toggle/ghost_roles))) + // Universal opt-out for all players. + if(!candidate_mob.client.prefs.read_preference(/datum/preference/toggle/ghost_roles)) continue // Opt-out for admins whom are currently adminned. - if(role && (!candidate_mob.client.prefs.read_preference(/datum/preference/toggle/ghost_roles_as_admin)) && candidate_mob.client.holder) + if((!candidate_mob.client.prefs.read_preference(/datum/preference/toggle/ghost_roles_as_admin)) && candidate_mob.client.holder) continue - if(role && !is_eligible(candidate_mob, role, check_jobban, ignore_category)) + if(!is_eligible(candidate_mob, role, check_jobban, ignore_category)) continue if(start_signed_up)