Fixes clockwork sigil candidate runtime, cleans up some jobban checks with defines (#5304)

This commit is contained in:
CitadelStationBot
2018-02-05 04:23:09 -06:00
committed by Poojawa
parent 03b33075e5
commit 9e229691cc
73 changed files with 196 additions and 214 deletions
@@ -92,7 +92,7 @@
var/mob/living/current_wizard = null
var/next_check = 0
var/cooldown = 600
var/faction = "wizard"
var/faction = ROLE_WIZARD
var/braindead_check = 0
/obj/structure/academy_wizard_spawner/New()
@@ -128,13 +128,12 @@
if(!current_wizard)
return
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as Wizard Academy Defender?", ROLE_WIZARD, null, ROLE_WIZARD, 50, current_wizard)
var/mob/dead/observer/chosen = null
if(candidates.len)
chosen = pick(candidates)
message_admins("[key_name_admin(chosen)] was spawned as Wizard Academy Defender")
if(LAZYLEN(candidates))
var/client/C = pick(candidates)
message_admins("[key_name_admin(C)] was spawned as Wizard Academy Defender")
current_wizard.ghostize() // on the off chance braindead defender gets back in
current_wizard.key = chosen.key
current_wizard.key = C.key
/obj/structure/academy_wizard_spawner/proc/summon_wizard()
var/turf/T = src.loc
@@ -272,11 +271,10 @@
servant_mind.transfer_to(H)
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [user.real_name] Servant?", ROLE_WIZARD, null, ROLE_WIZARD, 50, H)
var/mob/dead/observer/chosen = null
if(candidates.len)
chosen = pick(candidates)
message_admins("[key_name_admin(chosen)] was spawned as Dice Servant")
H.key = chosen.key
if(LAZYLEN(candidates))
var/client/C = pick(candidates)
message_admins("[key_name_admin(C)] was spawned as Dice Servant")
H.key = C.key
var/obj/effect/proc_holder/spell/targeted/summonmob/S = new
S.target_mob = H