Defers list init

This commit is contained in:
AnturK
2016-07-26 17:07:06 +02:00
parent c6d9df04ba
commit 491f06ded6
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -404,7 +404,7 @@
Question = "Would you like to be a special role?"
for(var/mob/dead/observer/G in player_list)
if(!G.key || !G.client || (ignore_category && G.ckey in poll_ignore[ignore_category]))
if(!G.key || !G.client || (ignore_category && poll_ignore[ignore_category] && G.ckey in poll_ignore[ignore_category]))
continue
if(be_special_flag)
if(!(G.client.prefs) || !(be_special_flag in G.client.prefs.be_special))
@@ -428,6 +428,9 @@
if(2)
G << "<span class='danger'>Choice registered: No.</span>"
if(3)
var/list/L = poll_ignore[ignore_category]
if(!L)
poll_ignore[ignore_category] = list()
poll_ignore[ignore_category] += G.ckey
G << "<span class='danger'>Choice registered: Never for this round.</span>"
sleep(poll_time)
+1 -1
View File
@@ -3,4 +3,4 @@
#define POLL_IGNORE_PAI "pai"
#define POLL_IGNORE_SENTIENCE_POTION "sentience_potion"
var/list/poll_ignore = list(POLL_IGNORE_PAI = list(),POLL_IGNORE_SENTIENCE_POTION = list())
var/list/poll_ignore = list()