From 3b0b19f6b64f4ad0bb4b74315e228d9d9b693b26 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 14 May 2017 19:42:51 -0500 Subject: [PATCH] Fixes role polls --- code/__HELPERS/game.dm.rej | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 code/__HELPERS/game.dm.rej diff --git a/code/__HELPERS/game.dm.rej b/code/__HELPERS/game.dm.rej new file mode 100644 index 0000000000..81d778a232 --- /dev/null +++ b/code/__HELPERS/game.dm.rej @@ -0,0 +1,42 @@ +diff a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm (rejected hunks) +@@ -449,15 +449,13 @@ + for(var/mob/dead/observer/G in GLOB.player_list) + candidates += G + +- pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates) +- +- return candidates ++ return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates) + + /proc/pollCandidates(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, ignore_category = null, flashwindow = TRUE, list/group = null) + var/time_passed = world.time + if (!Question) + Question = "Would you like to be a special role?" +- ++ var/list/result = list() + for(var/m in group) + var/mob/M = m + if(!M.key || !M.client || (ignore_category && GLOB.poll_ignore[ignore_category] && M.ckey in GLOB.poll_ignore[ignore_category])) +@@ -472,17 +470,17 @@ + if(jobban_isbanned(M, jobbanType) || jobban_isbanned(M, "Syndicate")) + continue + +- showCandidatePollWindow(M, poll_time, Question, group, ignore_category, time_passed, flashwindow) ++ showCandidatePollWindow(M, poll_time, Question, result, ignore_category, time_passed, flashwindow) + sleep(poll_time) + + //Check all our candidates, to make sure they didn't log off or get deleted during the wait period. +- for(var/mob/M in group) ++ for(var/mob/M in result) + if(!M.key || !M.client) +- group -= M ++ result -= M + +- listclearnulls(group) ++ listclearnulls(result) + +- return group ++ return result + + /proc/pollCandidatesForMob(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, mob/M, ignore_category = null) + var/list/L = pollGhostCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category)