Reverts Antag Chances (#7324)

This commit is contained in:
Geeves
2019-11-03 15:28:52 +02:00
committed by Erki
parent 865e9390de
commit 93890de42d
10 changed files with 7 additions and 20 deletions
+1 -4
View File
@@ -4,7 +4,6 @@
var/list/restricted_jobs = list() // Jobs that cannot be this antagonist (depending on config)
var/list/protected_jobs = list() // As above.
var/list/restricted_species = list() // species that cannot be this antag - Ryan784
var/list/chance_restricted_jobs = list() // chance based restrictions
// Strings.
var/welcome_text = "Cry havoc and let slip the dogs of war!"
@@ -94,7 +93,7 @@
return 1
// Get the raw list of potential players.
/datum/antagonist/proc/build_candidate_list(var/ghosts_only, var/allow_animals = 0, var/chance_per_job = TRUE)
/datum/antagonist/proc/build_candidate_list(var/ghosts_only, var/allow_animals = 0)
candidates = list() // Clear.
// Prune restricted status. Broke it up for readability.
@@ -112,8 +111,6 @@
log_debug("[key_name(player)] is not eligible to become a [role_text]: They are blacklisted for this role!")
else if(player_is_antag(player))
log_debug("[key_name(player)] is not eligible to become a [role_text]: They are already an antagonist!")
else if(!can_become_antag_chance(player) && chance_per_job)
log_debug("[key_name(player)] is not eligible to become a [role_text]: They are unlucky (based on job)!")
else
candidates += player
@@ -12,12 +12,6 @@
return 0
return 1
/datum/antagonist/proc/can_become_antag_chance(var/datum/mind/player)
if(!isnull(chance_restricted_jobs[player.assigned_role]))
return prob(chance_restricted_jobs[player.assigned_role])
else
return 1
/datum/antagonist/proc/antags_are_dead()
for(var/datum/mind/antag in current_antagonists)
if(mob_path && !istype(antag.current,mob_path))
@@ -7,7 +7,6 @@
restricted_jobs = list("AI", "Cyborg", "Head of Security", "Captain", "Internal Affairs Agent")
protected_jobs = list("Security Officer", "Security Cadet", "Warden", "Detective", "Forensic Technician")
chance_restricted_jobs = list("Security Officer" = 50, "Security Cadet" = 75, "Warden" = 40, "Detective" = 50, "Forensic Technician" = 50, "Head of Personnel" = 25, "Chief Engineer" = 25, "Research Director" = 25, "Chief Medical Officer" = 25) //Second value is chance to be considered for antag. Unlisted roles here are 100 by default.
restricted_species = list(
"Baseline Frame",
"Shell Frame",
-1
View File
@@ -19,7 +19,6 @@ var/datum/antagonist/cultist/cult
bantype = "cultist"
restricted_jobs = list("Chaplain","AI", "Cyborg", "Internal Affairs Agent", "Head of Security", "Captain")
protected_jobs = list("Security Officer", "Security Cadet", "Warden", "Detective", "Forensic Technician")
chance_restricted_jobs = list("Security Officer" = 50, "Security Cadet" = 75, "Warden" = 40, "Detective" = 50, "Forensic Technician" = 50, "Head of Personnel" = 25, "Chief Engineer" = 25, "Research Director" = 25, "Chief Medical Officer" = 25) //Second value is chance to be considered for antag. Unlisted roles here are 100 by default.
feedback_tag = "cult_objective"
antag_indicator = "cult"
welcome_text = "You have a talisman in your possession; one that will help you start the cult on this station. Use it well and remember - there are others."
-1
View File
@@ -28,7 +28,6 @@ var/datum/antagonist/loyalists/loyalists
faction_indicator = "loyal"
faction_invisible = 1
restricted_jobs = list("AI", "Cyborg")
chance_restricted_jobs = list("Security Officer" = 50, "Security Cadet" = 75, "Warden" = 40, "Detective" = 50, "Forensic Technician" = 50) //Second value is chance to be considered for antag. Unlisted roles here are 100 by default.
/datum/antagonist/loyalists/New()
..()
@@ -30,7 +30,6 @@ var/datum/antagonist/revolutionary/revs
restricted_jobs = list("AI", "Cyborg")
protected_jobs = list("Security Officer", "Security Cadet", "Warden", "Detective", "Forensic Technician", "Head of Personnel", "Chief Engineer", "Research Director", "Chief Medical Officer", "Captain", "Head of Security", "Internal Affairs Agent")
chance_restricted_jobs = list("Security Officer" = 50, "Security Cadet" = 75, "Warden" = 40, "Detective" = 50, "Forensic Technician" = 50, "Head of Personnel" = 25, "Chief Engineer" = 25, "Research Director" = 25, "Chief Medical Officer" = 25) //Second value is chance to be considered for antag. Unlisted roles here are 100 by default.
/datum/antagonist/revolutionary/New()
..()
-1
View File
@@ -5,7 +5,6 @@ var/datum/antagonist/traitor/traitors
id = MODE_TRAITOR
restricted_jobs = list("Internal Affairs Agent", "Head of Security", "Captain", "AI")
protected_jobs = list("Security Officer", "Security Cadet", "Warden", "Detective", "Forensic Technician")
chance_restricted_jobs = list("Security Officer" = 50, "Security Cadet" = 75, "Warden" = 40, "Detective" = 50, "Forensic Technician" = 50, "Head of Personnel" = 25, "Chief Engineer" = 25, "Research Director" = 25, "Chief Medical Officer" = 25) //Second value is chance to be considered for antag. Unlisted roles here are 100 by default.
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
faction = "syndicate"
-1
View File
@@ -9,7 +9,6 @@ var/datum/antagonist/vampire/vamp = null
restricted_jobs = list("AI", "Cyborg", "Chaplain", "Head of Security", "Captain", "Internal Affairs Agent")
protected_jobs = list("Security Officer", "Security Cadet", "Warden", "Detective", "Forensic Technician")
chance_restricted_jobs = list("Security Officer" = 50, "Security Cadet" = 75, "Warden" = 40, "Detective" = 50, "Forensic Technician" = 50, "Head of Personnel" = 25, "Chief Engineer" = 25, "Research Director" = 25, "Chief Medical Officer" = 25) //Second value is chance to be considered for antag. Unlisted roles here are 100 by default.
restricted_species = list(
"Baseline Frame",
"Shell Frame",
-4
View File
@@ -218,10 +218,6 @@ var/global/list/additional_antag_types = list()
antag.update_initial_spawn_target()
antag.build_candidate_list() //compile a list of all eligible candidates
//can't find enough antags? check again but don't apply the antag chance restrictions per job
if(antag.candidates.len < required_enemies)
antag.build_candidate_list(FALSE, FALSE, FALSE)
//antag roles that replace jobs need to be assigned before the job controller hands out jobs.
if(antag.flags & ANTAG_OVERRIDE_JOB)
antag.attempt_spawn() //select antags to be spawned
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- bugfix: "Reverts the sec antag chances changes, gamemodes should be normal again now."