From f1dae5f0a17ba13388f723bfdbfbc566d7445b90 Mon Sep 17 00:00:00 2001 From: 4DPlanner <3combined@gmail.com> Date: Sun, 28 May 2017 22:23:54 +0100 Subject: [PATCH] Part 3 --- code/datums/antagonists/datum_traitor.dm | 6 ++++-- code/game/gamemodes/traitor/double_agents.dm | 6 +++--- code/game/gamemodes/traitor/traitor.dm | 10 +++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/code/datums/antagonists/datum_traitor.dm b/code/datums/antagonists/datum_traitor.dm index 075bba803a0..bd1738ce444 100644 --- a/code/datums/antagonists/datum_traitor.dm +++ b/code/datums/antagonists/datum_traitor.dm @@ -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, "You are the [owner.special_role].") 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() diff --git a/code/game/gamemodes/traitor/double_agents.dm b/code/game/gamemodes/traitor/double_agents.dm index 1f958a634ec..32d7da40728 100644 --- a/code/game/gamemodes/traitor/double_agents.dm +++ b/code/game/gamemodes/traitor/double_agents.dm @@ -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] ..() diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 52666e77fbb..983a8c0cc44 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -22,6 +22,7 @@ Traitors: Accomplish your objectives.\n\ Crew: 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