Fixed some possible runtimes with pollCandidates() (#19919)

* Fixed some possible runtimes with pollCandidates()

* Fixed bug in pollCandidatesForMobs()
This commit is contained in:
Cruix
2016-08-22 08:45:22 +12:00
committed by oranges
parent c3da691c16
commit f406e518cc
7 changed files with 23 additions and 7 deletions
@@ -184,7 +184,7 @@
user << "<span class='notice'>You offer the sentience potion to [SM]...</span>"
being_used = 1
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [SM.name]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, POLL_IGNORE_SENTIENCE_POTION) // see poll_ignore.dm
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [SM.name]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, POLL_IGNORE_SENTIENCE_POTION, SM) // see poll_ignore.dm
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)