More debug feedback.

This commit is contained in:
Zuhayr
2015-09-05 12:57:20 +09:30
parent 58cd8c3e03
commit 7af1f27b28
3 changed files with 13 additions and 12 deletions

View File

@@ -108,14 +108,15 @@
/datum/antagonist/proc/attempt_late_spawn(var/datum/mind/player)
if(!can_late_spawn())
return
return 0
if(!istype(player)) player = get_candidates(is_latejoin_template())
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].")
if(istype(player.current, /mob/dead))
create_default(player.current)
else
add_antagonist(player,0,0,0,1,1)
return
return 1
/datum/antagonist/proc/build_candidate_list(var/ghosts_only)
// Get the raw list of potential players.

View File

@@ -6,7 +6,7 @@
var/list/usable_templates = list()
for(var/datum/antagonist/A in supplied_templates)
if(A.can_late_spawn())
message_admins("AUTO[capitalize(name)]: [A.id] selected for spawn attempt.")
message_admins("AUTO[uppertext(name)]: [A.id] selected for spawn attempt.")
usable_templates |= A
return usable_templates
@@ -29,7 +29,7 @@
if(world.time < next_spawn)
return
message_admins("AUTO[capitalize(name)]: Attempting spawn.")
message_admins("AUTO[uppertext(name)]: Attempting spawn.")
var/list/usable_templates
if(latejoin_only && latejoin_templates.len)
@@ -37,16 +37,16 @@
else if (antag_templates && antag_templates.len)
usable_templates = get_usable_templates(antag_templates)
else
message_admins("AUTO[capitalize(name)]: Failed to find configured mode spawn templates, please disable auto-antagonists until one is added.")
message_admins("AUTO[uppertext(name)]: Failed to find configured mode spawn templates, please disable auto-antagonists until one is added.")
round_autoantag = 0
return
while(usable_templates.len)
var/datum/antagonist/spawn_antag = pick(usable_templates)
usable_templates -= spawn_antag
if( spawn_antag.attempt_late_spawn(player))
message_admins("AUTO[capitalize(name)]: Attempting to latespawn [spawn_antag.id]. ([spawn_antag.get_antag_count()]/[spawn_antag.cur_max])")
if(spawn_antag.attempt_late_spawn(player))
message_admins("AUTO[uppertext(name)]: Attempting to latespawn [spawn_antag.id]. ([spawn_antag.get_antag_count()]/[spawn_antag.cur_max])")
next_spawn = world.time + rand(min_autotraitor_delay, max_autotraitor_delay)
return
message_admins("AUTO[capitalize(name)]: Failed to find a viable spawn template.")
message_admins("AUTO[uppertext(name)]: Failed to proc a viable spawn template.")
next_spawn = world.time + rand(min_autotraitor_delay, max_autotraitor_delay)

View File

@@ -1366,7 +1366,7 @@ proc/admin_notice(var/message, var/rights)
/datum/admins/proc/force_antag_latespawn()
set category = "Admin"
set name = "Force Template Spawn"
set desc = "Should fix any mob sprite update errors."
set desc = "Force an antagonist template to spawn."
if (!istype(src,/datum/admins))
src = usr.client.holder
@@ -1383,13 +1383,13 @@ proc/admin_notice(var/message, var/rights)
return
var/datum/antagonist/antag = all_antag_types[antag_type]
log_admin("[key_name(usr)] attempting to force latespawn with template [antag.id].")
message_admins("[key_name(usr)] attempting to force latespawn with template [antag.id].")
antag.attempt_late_spawn()
/datum/admins/proc/force_mode_latespawn()
set category = "Admin"
set name = "Force Mode Spawn"
set desc = "Should fix any mob sprite update errors."
set desc = "Force autotraitor to proc."
if (!istype(src,/datum/admins))
src = usr.client.holder
@@ -1401,6 +1401,6 @@ proc/admin_notice(var/message, var/rights)
usr << "Mode has not started."
return
log_admin("[key_name(usr)] attempting to force mode latespawn.")
message_admins("[key_name(usr)] attempting to force mode latespawn.")
ticker.mode.next_spawn = 0
ticker.mode.try_latespawn()