Antag system cleanup/fixes.

This commit is contained in:
Zuhayr
2015-09-04 18:28:05 +09:30
parent 9728f28880
commit 23fb8d8b99
35 changed files with 311 additions and 465 deletions
+5 -3
View File
@@ -1160,8 +1160,10 @@ 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)"
@@ -1176,7 +1178,7 @@ proc/admin_notice(var/message, var/rights)
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)
if(ticker.mode.antag_tags && (antag.id in ticker.mode.antag_tags))
cur_max_antags = antag.max_antags_round
else
cur_max_antags = antag.max_antags
@@ -34,6 +34,11 @@
/mob/living/simple_animal/borer/roundstart
roundstart = 1
/mob/living/simple_animal/borer/Login()
..()
if(mind)
borers.add_antagonist(mind)
/mob/living/simple_animal/borer/New()
..()
@@ -150,11 +155,7 @@
if(!host) return
if(host.mind)
//If they're not a proper traitor, reset their antag status.
if(host.mind.special_role == "Borer Thrall")
host << "<span class ='danger'>You are no longer an antagonist.</span>"
borers.hosts -= host.mind
host.mind.special_role = null
borers.remove_antagonist(host.mind)
src.loc = get_turf(host)
@@ -109,15 +109,9 @@
//Update their traitor status.
if(host.mind)
if(!host.mind.special_role)
borers.hosts |= host.mind
host.mind.special_role = "Borer Thrall"
host << "<span class='danger'>A creeping lassitude surrounds you. Your mind is being invaded by an alien intelligence and that's just fine.</span>"
host << "<span class = 'danger'>You are now a thrall to a cortical borer. Please listen to what they have to say; they're in your head.</span>"
show_generic_antag_text(host.mind)
borers.add_antagonist_mind(host.mind, 1, borers.faction_role_text, borers.faction_welcome)
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/I = H.internal_organs_by_name["brain"]
if(!I) // No brain organ, so the borer moves in and replaces it permanently.