This commit is contained in:
4DPlanner
2017-05-28 22:23:54 +01:00
parent dcaace7738
commit f1dae5f0a1
3 changed files with 12 additions and 10 deletions
+4 -2
View File
@@ -2,10 +2,12 @@
name = "Traitor"
var/employer = "The Syndicate"
var/give_objectives = TRUE
var/should_give_codewords = TRUE
/datum/antagonist/traitor/custom //used to give custom objectives
silent = TRUE
give_objectives = FALSE
should_give_codewords = FALSE
/datum/antagonist/traitor/on_gain()
SSticker.mode.traitors+=owner
@@ -133,7 +135,8 @@
/datum/antagonist/traitor/greet()
to_chat(owner.current, "<B><font size=3 color=red>You are the [owner.special_role].</font></B>")
owner.announce_objectives()
give_codewords()
if(should_give_codewords)
give_codewords()
/datum/antagonist/traitor/proc/finalize_traitor()
if(issilicon(owner.current))
@@ -167,7 +170,6 @@
var/law = "Accomplish your objectives at all costs."
var/law_borg = "Accomplish your AI's objectives at all costs."
killer.set_zeroth_law(law, law_borg)
give_codewords(killer)
killer.set_syndie_radio()
to_chat(killer, "Your radio has been upgraded! Use :t to speak on an encrypted channel with Syndicate Agents!")
killer.add_malf_picker()
+3 -3
View File
@@ -23,11 +23,11 @@
/datum/game_mode/traitor/internal_affairs/post_setup()
var/i = 0
for(var/datum/mind/traitor in traitors)
for(var/datum/mind/traitor in pre_traitors)
i++
if(i + 1 > traitors.len)
if(i + 1 > pre_traitors.len)
i = 0
target_list[traitor] = traitors[i+1]
target_list[traitor] = pre_traitors[i+1]
..()
+5 -5
View File
@@ -22,6 +22,7 @@
<span class='danger'>Traitors</span>: Accomplish your objectives.\n\
<span class='notice'>Crew</span>: Do not let the traitors succeed!"
var/list/datum/mind/pre_traitors = list()
var/traitors_possible = 4 //hard limit on traitors if scaling is turned off
var/num_modifier = 0 // Used for gamemodes, that are a child of traitor, that need more than the usual.
var/antag_datum = ANTAG_DATUM_TRAITOR //what type of antag to create
@@ -46,23 +47,22 @@
if (!antag_candidates.len)
break
var/datum/mind/traitor = pick(antag_candidates)
traitors += traitor
pre_traitors += traitor
traitor.special_role = traitor_name
traitor.restricted_roles = restricted_jobs
log_game("[traitor.key] (ckey) has been selected as a [traitor_name]")
antag_candidates.Remove(traitor)
if(traitors.len < required_enemies)
if(pre_traitors.len < required_enemies)
return 0
return 1
/datum/game_mode/traitor/post_setup()
for(var/datum/mind/traitor in traitors)
for(var/datum/mind/traitor in pre_traitors)
spawn(rand(10,100))
var/datum/antagonist/traitor/traitordatum = traitor.add_antag_datum(antag_datum)
traitordatum.finalize_traitor()
traitor.add_antag_datum(antag_datum)
if(!exchange_blue)
exchange_blue = -1 //Block latejoiners from getting exchange objectives
modePlayer += traitors