Adds a option to config.txt called PROTECT_ROLES_FROM_ANTAGONIST.

If PROTECT_ROLES_FROM_ANTAGONIST is set, sec/hos/captain/AI cannot be antagonists in most modes
If it is not set, only jobs that are mutually exclusive to the role (sec/head during rev, etc) are immune from being antagonist

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3225 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
VivianFoxfoot@gmail.com
2012-03-01 23:30:24 +00:00
parent bc7517ca42
commit 6ae0d3018d
9 changed files with 33 additions and 3 deletions
+4
View File
@@ -31,6 +31,7 @@
var/del_new_on_log = 1 // del's new players if they log before they spawn in
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/list/mode_names = list()
var/list/modes = list() // allowed modes
@@ -231,6 +232,9 @@
if ("traitor_scaling")
config.traitor_scaling = 1
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
if ("probability")
var/prob_pos = findtext(value, " ")
var/prob_name = null
@@ -43,6 +43,10 @@
world << "<B>There are alien changelings on the station. Do not let the changelings succeed!</B>"
/datum/game_mode/changeling/pre_setup()
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
for(var/datum/mind/player in possible_changelings)
@@ -2,6 +2,7 @@
name = "traitor+changeling"
config_tag = "traitorchan"
traitors_possible = 3 //hard limit on traitors if scaling is turned off
restricted_jobs = list("AI", "Cyborg")
required_players = 20
required_enemies = 2
recommended_enemies = 3
@@ -12,6 +13,9 @@
/datum/game_mode/traitor/changeling/pre_setup()
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
for(var/datum/mind/player in possible_changelings)
+5 -1
View File
@@ -19,7 +19,8 @@
/datum/game_mode/cult
name = "cult"
config_tag = "cult"
restricted_jobs = list("Chaplain", "Security Officer", "Warden", "Detective", "AI", "Cyborg", "Captain", "Head of Security")
restricted_jobs = list("Chaplain","AI", "Cyborg")
protected_jobs = list("Security Officer", "Warden", "Detective", "Captain", "Head of Security")
required_players = 15
required_enemies = 3
recommended_enemies = 4
@@ -57,6 +58,9 @@
objectives += "eldergod"
objectives += "sacrifice"
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
var/list/cultists_possible = get_players_for_role(BE_CULTIST)
for(var/datum/mind/player in cultists_possible)
for(var/job in restricted_jobs)//Removing heads and such from the list
+2 -1
View File
@@ -20,7 +20,8 @@
station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm
explosion_in_progress = 0 //sit back and relax
list/datum/mind/modePlayer = new
list/restricted_jobs = list()
list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
list/protected_jobs = list() // Jobs that can't be tratiors because
required_players = 0
required_enemies = 0
recommended_enemies = 0
+1
View File
@@ -30,6 +30,7 @@
/datum/game_mode/nuclear/can_start()//This could be better, will likely have to recode it later
if(!..())
return 0
var/list/possible_syndicates = get_players_for_role(BE_OPERATIVE)
var/agent_number = 0
@@ -40,6 +40,10 @@
//Gets the round setup, cancelling if there's not enough players at the start//
///////////////////////////////////////////////////////////////////////////////
/datum/game_mode/revolution/pre_setup()
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
var/list/datum/mind/possible_headrevs = get_players_for_role(BE_REV)
var/head_check = 0
+6 -1
View File
@@ -5,7 +5,8 @@
/datum/game_mode/traitor
name = "traitor"
config_tag = "traitor"
restricted_jobs = list("Cyborg", "AI", "Security Officer", "Warden", "Detective", "Head of Security", "Captain")
restricted_jobs = list()
protected_jobs = list("Cyborg", "AI", "Security Officer", "Warden", "Detective", "Head of Security", "Captain")
required_players = 0
required_enemies = 1
recommended_enemies = 4
@@ -27,6 +28,10 @@
/datum/game_mode/traitor/pre_setup()
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
var/list/possible_traitors = get_players_for_role(BE_TRAITOR)
// stop setup if no possible traitors