Fixes autotraitor.

This commit is contained in:
Zuhayr
2015-09-05 13:15:30 +09:30
parent 7af1f27b28
commit f74182680c
2 changed files with 8 additions and 1 deletions

View File

@@ -109,7 +109,13 @@
/datum/antagonist/proc/attempt_late_spawn(var/datum/mind/player) /datum/antagonist/proc/attempt_late_spawn(var/datum/mind/player)
if(!can_late_spawn()) if(!can_late_spawn())
return 0 return 0
if(!istype(player)) player = get_candidates(is_latejoin_template()) if(!istype(player))
var/list/players = get_candidates(is_latejoin_template())
if(players && players.len)
player = pick(players)
if(!istype(player))
message_admins("AUTO[uppertext(ticker.mode.name)]: Failed to find a candidate for [role_text].")
return 0
player.current << "<span class='danger'><i>You have been selected this round as an antagonist!</i></span>" player.current << "<span class='danger'><i>You have been selected this round as an antagonist!</i></span>"
message_admins("AUTO[uppertext(ticker.mode.name)]: Selected [player] as a [role_text].") message_admins("AUTO[uppertext(ticker.mode.name)]: Selected [player] as a [role_text].")
if(istype(player.current, /mob/dead)) if(istype(player.current, /mob/dead))

View File

@@ -1380,6 +1380,7 @@ proc/admin_notice(var/message, var/rights)
var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types
if(!antag_type || !all_antag_types[antag_type]) if(!antag_type || !all_antag_types[antag_type])
usr << "Aborting."
return return
var/datum/antagonist/antag = all_antag_types[antag_type] var/datum/antagonist/antag = all_antag_types[antag_type]