Implements Antag Player Client Age Restriction (#7400)

Adds limits to how old a client should be on Aurora before they can possibly roll for an antag. Variable for each antagonist, based on difficulty and importance to round.
This commit is contained in:
Geeves
2019-11-17 18:37:07 +02:00
committed by Erki
parent 83523c0b3e
commit dcb87e62ec
14 changed files with 23 additions and 2 deletions
+5 -2
View File
@@ -3,7 +3,8 @@
// Text shown when becoming this antagonist.
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/restricted_species = list() // species that cannot be this antag - Ryan784
var/required_age = null // how old should player clients be before being allowed to play this antag
// Strings.
var/welcome_text = "Cry havoc and let slip the dogs of war!"
@@ -105,12 +106,14 @@
log_debug("[key_name(player)] is not eligible to become a [role_text]: Simple animals cannot be this role!")
else if(player.special_role)
log_debug("[key_name(player)] is not eligible to become a [role_text]: They already have a special role ([player.special_role])!")
else if (player in pending_antagonists)
else if(player in pending_antagonists)
log_debug("[key_name(player)] is not eligible to become a [role_text]: They have already been selected for this role!")
else if(!can_become_antag(player))
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(required_age && required_age > player.current.client?.player_age)
log_debug("[key_name(player)] is not eligible to become a [role_text]: Their playtime age is too low!")
else
candidates += player
+1
View File
@@ -7,6 +7,7 @@ var/datum/antagonist/mutineer/mutineers
id = MODE_MUTINEER
antag_indicator = "mutineer"
restricted_jobs = list("Captain")
required_age = 10
/datum/antagonist/mutineer/New(var/no_reference)
..()
@@ -12,6 +12,7 @@ var/datum/antagonist/mercenary/mercs
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_HAS_NUKE | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER
id_type = /obj/item/card/id/syndicate
antaghud_indicator = "hudoperative"
required_age = 10
hard_cap = 4
hard_cap_round = 8
+1
View File
@@ -10,6 +10,7 @@ var/datum/antagonist/ninja/ninjas
restricted_species = list("Diona")
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_RANDSPAWN | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
antaghud_indicator = "hudninja"
required_age = 10
initial_spawn_req = 2
initial_spawn_target = 2
+1
View File
@@ -10,6 +10,7 @@ var/datum/antagonist/raider/raiders
welcome_text = "Use :H to talk on your encrypted channel."
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER
antaghud_indicator = "hudmutineer"
required_age = 10
hard_cap = 6
hard_cap_round = 10
+1
View File
@@ -9,6 +9,7 @@ var/datum/antagonist/wizard/wizards
welcome_text = "You will find a list of available spells in your spell book. Choose your magic arsenal carefully.<br>In your pockets you will find a teleport scroll. Use it as needed."
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
antaghud_indicator = "hudwizard"
required_age = 10
hard_cap = 1
hard_cap_round = 3
@@ -16,6 +16,7 @@
"Zeng-Hu Mobility Frame",
"Bishop Accessory Frame"
)
required_age = 10
welcome_text = "Use say \"#g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you perform a Full DNA Extraction them."
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
+1
View File
@@ -32,6 +32,7 @@ var/datum/antagonist/cultist/cult
initial_spawn_req = 4
initial_spawn_target = 6
antaghud_indicator = "hudcultist"
required_age = 10
faction = "cult"
+1
View File
@@ -28,6 +28,7 @@ var/datum/antagonist/loyalists/loyalists
faction_indicator = "loyal"
faction_invisible = 1
restricted_jobs = list("AI", "Cyborg")
required_age = 31
/datum/antagonist/loyalists/New()
..()
@@ -30,6 +30,7 @@ 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")
required_age = 31
/datum/antagonist/revolutionary/New()
..()
+1
View File
@@ -15,6 +15,7 @@ var/datum/antagonist/rogue_ai/malf
initial_spawn_req = 1
initial_spawn_target = 1
antaghud_indicator = "hudmalai"
required_age = 31
/datum/antagonist/rogue_ai/New()
..()
+1
View File
@@ -6,6 +6,7 @@ var/datum/antagonist/traitor/traitors
restricted_jobs = list("Internal Affairs Agent", "Head of Security", "Captain", "AI")
protected_jobs = list("Security Officer", "Security Cadet", "Warden", "Detective", "Forensic Technician")
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
required_age = 10
faction = "syndicate"
+1
View File
@@ -19,6 +19,7 @@ var/datum/antagonist/vampire/vamp = null
"Zeng-Hu Mobility Frame",
"Bishop Accessory Frame"
)
required_age = 10
welcome_text = "You are a Vampire! Use the \"<b>Vampire Help</b>\" command to learn about the backstory and mechanics! Stay away from the Chaplain, and use the darkness to your advantage."
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
+6
View File
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- rscadd: "Antagonist roles are now restricted by player account (on Aurora) age."