From c0425bc06eee72457c1c409e82be0a21db8fa077 Mon Sep 17 00:00:00 2001 From: paprka Date: Mon, 13 Oct 2014 17:21:02 -0700 Subject: [PATCH 1/2] initial commit of assistant antag option --- code/controllers/configuration.dm | 3 +++ code/datums/helper_datums/getrev.dm | 1 + code/game/gamemodes/changeling/changeling.dm | 3 +++ code/game/gamemodes/changeling/traitor_chan.dm | 3 +++ code/game/gamemodes/cult/cult.dm | 3 +++ code/game/gamemodes/gang/gang.dm | 3 +++ code/game/gamemodes/revolution/revolution.dm | 3 +++ code/game/gamemodes/traitor/traitor.dm | 3 +++ code/modules/admin/verbs/one_click_antag.dm | 15 +++++++++++++++ config/game_options.txt | 3 +++ 10 files changed, 40 insertions(+) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index ead5f6100d7..dc29bfbc221 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -82,6 +82,7 @@ var/traitor_objectives_amount = 2 var/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other + var/protect_assistant_from_antagonist = 0// If security and such can be traitor/cult/other var/enforce_human_authority = 0 //If non-human species are barred from joining as a head of staff var/allow_latejoin_antagonists = 0 // If late-joining players can be traitor/changeling var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. @@ -375,6 +376,8 @@ if("protect_roles_from_antagonist") config.protect_roles_from_antagonist = 1 + if("protect_assistant_from_antagonist") + config.protect_asssitant_from_antagonist = 1 if("enforce_human_authority") config.enforce_human_authority = 1 if("allow_latejoin_antagonists") diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index a4897448f17..4a008ed31de 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -35,6 +35,7 @@ client/verb/showrevinfo() src << "Revision unknown" src << "Current Infomational Settings:" src << "Protect Authority Roles From Traitor: [config.protect_roles_from_antagonist]" + src << "Protect Assistant Role From Traitor: [config.protect_assistant_from_antagonist]" src << "Enforce Human Authority: [config.enforce_human_authority]" src << "Allow Latejoin Antagonists: [config.allow_latejoin_antagonists]" return \ No newline at end of file diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index e3a47377733..d0a5ec0ba2c 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -43,6 +43,9 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" if(config.protect_roles_from_antagonist) restricted_jobs += protected_jobs + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + var/num_changelings = 1 if(config.changeling_scaling_coeff) diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm index e1f84aeecde..6f13e670890 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -26,6 +26,9 @@ if(config.protect_roles_from_antagonist) restricted_jobs += protected_jobs + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING) var/num_changelings = 1 diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index c99942aee3e..eb67ca4895d 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -62,6 +62,9 @@ if(config.protect_roles_from_antagonist) restricted_jobs += protected_jobs + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + for(var/datum/mind/player in antag_candidates) for(var/job in restricted_jobs)//Removing heads and such from the list if(player.assigned_role == job) diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index 0ff21b4c6b8..9a4374959f7 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -33,6 +33,9 @@ if(config.protect_roles_from_antagonist) restricted_jobs += protected_jobs + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + for(var/datum/mind/player in antag_candidates) for(var/job in restricted_jobs)//Removing heads and such from the list if(player.assigned_role == job) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 11dac93a53a..df95f40b30b 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -41,6 +41,9 @@ if(config.protect_roles_from_antagonist) restricted_jobs += protected_jobs + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + var/head_check = 0 for(var/mob/new_player/player in player_list) if(player.mind.assigned_role in command_positions) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index b60b0881165..d1c5b769b03 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -30,6 +30,9 @@ if(config.protect_roles_from_antagonist) restricted_jobs += protected_jobs + if(config.protect_assistant_from_antagonist) + restricted_jobs += "Assistant" + var/num_traitors = 1 if(config.traitor_scaling_coeff) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 19db9821666..4a5110e6016 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -62,6 +62,9 @@ client/proc/one_click_antag() if(config.protect_roles_from_antagonist) temp.restricted_jobs += temp.protected_jobs + if(config.protect_assistant_from_antagonist) + temp.restricted_jobs += "Assistant" + var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null @@ -94,6 +97,9 @@ client/proc/one_click_antag() if(config.protect_roles_from_antagonist) temp.restricted_jobs += temp.protected_jobs + if(config.protect_assistant_from_antagonist) + temp.restricted_jobs += "Assistant" + var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null @@ -124,6 +130,9 @@ client/proc/one_click_antag() if(config.protect_roles_from_antagonist) temp.restricted_jobs += temp.protected_jobs + if(config.protect_assistant_from_antagonist) + temp.restricted_jobs += "Assistant" + var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null @@ -189,6 +198,9 @@ client/proc/one_click_antag() if(config.protect_roles_from_antagonist) temp.restricted_jobs += temp.protected_jobs + if(config.protect_assistant_from_antagonist) + temp.restricted_jobs += "Assistant" + var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null @@ -391,6 +403,9 @@ client/proc/one_click_antag() if(config.protect_roles_from_antagonist) temp.restricted_jobs += temp.protected_jobs + if(config.protect_assistant_from_antagonist) + temp.restricted_jobs += "Assistant" + var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null diff --git a/config/game_options.txt b/config/game_options.txt index 107dceb009f..c1cce91ee72 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -129,6 +129,9 @@ TRAITOR_OBJECTIVES_AMOUNT 2 ## implants from being most antagonists. #PROTECT_ROLES_FROM_ANTAGONIST +## Uncomment to prohibit assistants from becoming most antagonists. +#PROTECT_ASSISTANT_FROM_ANTAGONIST + ## If non-human species are barred from joining as a head of staff #ENFORCE_HUMAN_AUTHORITY From 37860bc09b9f443bb85bb8fe7be49878c4c92b51 Mon Sep 17 00:00:00 2001 From: paprka Date: Mon, 13 Oct 2014 17:40:56 -0700 Subject: [PATCH 2/2] typo and comment fixes in configuration.dm --- code/controllers/configuration.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index dc29bfbc221..34df3fa6245 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -81,8 +81,8 @@ var/security_scaling_coeff = 8 //how much does the amount of players get divided by to determine open security officer positions var/traitor_objectives_amount = 2 - var/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other - var/protect_assistant_from_antagonist = 0// If security and such can be traitor/cult/other + var/protect_roles_from_antagonist = 0 //If security and such can be traitor/cult/other + var/protect_assistant_from_antagonist = 0 //If assistants can be traitor/cult/other var/enforce_human_authority = 0 //If non-human species are barred from joining as a head of staff var/allow_latejoin_antagonists = 0 // If late-joining players can be traitor/changeling var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. @@ -377,7 +377,7 @@ if("protect_roles_from_antagonist") config.protect_roles_from_antagonist = 1 if("protect_assistant_from_antagonist") - config.protect_asssitant_from_antagonist = 1 + config.protect_assistant_from_antagonist = 1 if("enforce_human_authority") config.enforce_human_authority = 1 if("allow_latejoin_antagonists")