Merge remote-tracking branch 'upstream/master' into dev-freeze

Conflicts:
	code/game/antagonist/alien/borer.dm
	code/game/gamemodes/game_mode.dm
	code/game/gamemodes/nuclear/nuclear.dm
	code/game/gamemodes/traitor/traitor.dm
	code/game/objects/items/robot/robot_parts.dm
	code/setup.dm
This commit is contained in:
PsiOmega
2015-09-05 09:24:30 +02:00
50 changed files with 582 additions and 614 deletions

View File

@@ -1160,30 +1160,27 @@ proc/admin_notice(var/message, var/rights)
out += "<hr>"
if(ticker.mode.antag_tag)
out += "<b>Core antag id:</b> <a href='?src=\ref[ticker.mode];debug_antag=[ticker.mode.antag_tag]'>[ticker.mode.antag_tag]</a>.</br>"
if(ticker.mode.antag_tags && ticker.mode.antag_tags.len)
out += "<b>Core antag templates:</b></br>"
for(var/antag_tag in ticker.mode.antag_tags)
out += "<a href='?src=\ref[ticker.mode];debug_antag=[antag_tag]'>[antag_tag]</a>.</br>"
if(ticker.mode.round_autoantag)
out += "<b>Autotraitor <a href='?src=\ref[ticker.mode];toggle=autotraitor'>enabled</a></b> ([ticker.mode.get_antag_prob()]% spawn chance)"
if(ticker.mode.antag_scaling_coeff)
out += "<b>Autotraitor <a href='?src=\ref[ticker.mode];toggle=autotraitor'>enabled</a></b>."
if(ticker.mode.antag_scaling_coeff > 0)
out += " (scaling with <a href='?src=\ref[ticker.mode];set=antag_scaling'>[ticker.mode.antag_scaling_coeff]</a>)"
else
out += " (not currently scaling, <a href='?src=\ref[ticker.mode];set=antag_scaling'>set a coefficient</a>)"
out += "<br/>"
else
out += "<b>Autotraitor <a href='?src=\ref[ticker.mode];toggle=autotraitor'>disabled</a></b>.<br/>"
out += "<b>All antag ids:</b>"
if(ticker.mode.antag_templates && ticker.mode.antag_templates.len).
var/playercount = ticker.mode.num_players()
for(var/datum/antagonist/antag in ticker.mode.antag_templates)
var/cur_max_antags
if(ticker.mode.antag_tag && antag.id == ticker.mode.antag_tag)
cur_max_antags = antag.max_antags_round
else
cur_max_antags = antag.max_antags
if(ticker.mode.antag_scaling_coeff)
cur_max_antags = Clamp((playercount/ticker.mode.antag_scaling_coeff), 1, cur_max_antags)
antag.update_current_antag_max()
out += " <a href='?src=\ref[ticker.mode];debug_antag=[antag.id]'>[antag.id]</a>"
out += " ([antag.get_antag_count()]/[cur_max_antags]) "
out += " ([antag.get_antag_count()]/[antag.cur_max]) "
out += " <a href='?src=\ref[ticker.mode];remove_antag_type=[antag.id]'>\[-\]</a><br/>"
else
out += " None."
@@ -1365,3 +1362,46 @@ proc/admin_notice(var/message, var/rights)
tomob.ckey = frommob.ckey
qdel(frommob)
return 1
/datum/admins/proc/force_antag_latespawn()
set category = "Admin"
set name = "Force Template Spawn"
set desc = "Force an antagonist template to spawn."
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
return
if(!ticker || !ticker.mode)
usr << "Mode has not started."
return
var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types
if(!antag_type || !all_antag_types[antag_type])
usr << "Aborting."
return
var/datum/antagonist/antag = all_antag_types[antag_type]
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 = "Force autotraitor to proc."
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
return
if(!ticker || !ticker.mode)
usr << "Mode has not started."
return
message_admins("[key_name(usr)] attempting to force mode latespawn.")
ticker.mode.next_spawn = 0
ticker.mode.try_latespawn()