From 8c9fcd4ca75a88374775ca01aca86db549636121 Mon Sep 17 00:00:00 2001 From: "Mr. 27" <45323883+Dutch-VanDerLinde@users.noreply.github.com> Date: Thu, 20 Jun 2024 07:12:58 -0400 Subject: [PATCH] Fix ERT becoming sleeper agents and add sleeper agent preferences (#27817) * b * Update antags.ftl * m * ok * Update events.yml * antag * a * Create InitialInfectedExemptComponent.cs * Delete InitialInfectedExemptComponent.cs * yes * Delete InitialInfectedExemptComponent.cs * Create AntagImmuneComponent.cs --- .../Antag/Components/AntagImmuneComponent.cs | 7 +++++++ .../Zombies/InitialInfectedExemptComponent.cs | 7 ------- Resources/Locale/en-US/prototypes/roles/antags.ftl | 3 +++ .../Prototypes/Entities/Mobs/Player/humanoid.yml | 9 ++------- Resources/Prototypes/GameRules/events.yml | 12 ++++++++---- Resources/Prototypes/GameRules/roundstart.yml | 5 ++++- Resources/Prototypes/Roles/Antags/traitor.yml | 7 +++++++ 7 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 Content.Server/Antag/Components/AntagImmuneComponent.cs delete mode 100644 Content.Server/Zombies/InitialInfectedExemptComponent.cs diff --git a/Content.Server/Antag/Components/AntagImmuneComponent.cs b/Content.Server/Antag/Components/AntagImmuneComponent.cs new file mode 100644 index 000000000000..3ae8e049f60b --- /dev/null +++ b/Content.Server/Antag/Components/AntagImmuneComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Server.Antag.Components; + +[RegisterComponent] +public partial class AntagImmuneComponent : Component +{ + +} diff --git a/Content.Server/Zombies/InitialInfectedExemptComponent.cs b/Content.Server/Zombies/InitialInfectedExemptComponent.cs deleted file mode 100644 index f2dfda3f872d..000000000000 --- a/Content.Server/Zombies/InitialInfectedExemptComponent.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Content.Server.Zombies; - -[RegisterComponent] -public sealed partial class InitialInfectedExemptComponent : Component -{ - -} diff --git a/Resources/Locale/en-US/prototypes/roles/antags.ftl b/Resources/Locale/en-US/prototypes/roles/antags.ftl index f0038b0eb96d..ba43d4ff85bc 100644 --- a/Resources/Locale/en-US/prototypes/roles/antags.ftl +++ b/Resources/Locale/en-US/prototypes/roles/antags.ftl @@ -1,6 +1,9 @@ roles-antag-syndicate-agent-name = Syndicate agent roles-antag-syndicate-agent-objective = Complete your objectives without being caught. +roles-antag-syndicate-agent-sleeper-name = Syndicate sleeper agent +roles-antag-syndicate-agent-sleeper-objective = A form of syndicate agent that can activate at any point in the middle of the shift. + roles-antag-initial-infected-name = Initial Infected roles-antag-initial-infected-objective = Once you turn, infect as many other crew members as possible. diff --git a/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml b/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml index e365ee3a1cfa..6067c95fd3c6 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml @@ -12,7 +12,7 @@ parent: EventHumanoid components: - type: MindShield - - type: InitialInfectedExempt + - type: AntagImmune ## Death Squad @@ -30,7 +30,6 @@ - NamesLastMilitary - type: RandomHumanoidSpawner settings: DeathSquad - - type: InitialInfectedExempt - type: randomHumanoidSettings id: DeathSquad @@ -66,7 +65,6 @@ - NamesLastMilitary - type: RandomHumanoidSpawner settings: ERTLeader - - type: InitialInfectedExempt - type: randomHumanoidSettings id: ERTLeader @@ -96,7 +94,6 @@ state: ertleadereva - type: RandomHumanoidSpawner settings: ERTLeaderEVA - - type: InitialInfectedExempt - type: randomHumanoidSettings id: ERTLeaderEVA @@ -117,7 +114,6 @@ components: - type: RandomHumanoidSpawner settings: ERTLeaderEVALecter - - type: InitialInfectedExempt - type: randomHumanoidSettings id: ERTLeaderEVALecter @@ -453,7 +449,6 @@ state: cburn - type: RandomHumanoidSpawner settings: CBURNAgent - - type: InitialInfectedExempt - type: randomHumanoidSettings id: CBURNAgent @@ -470,6 +465,7 @@ nameSegments: - NamesFirstMilitary - NamesLastMilitary + ## Central Command - type: entity @@ -481,7 +477,6 @@ state: centcom - type: RandomHumanoidSpawner settings: CentcomOfficial - - type: InitialInfectedExempt - type: randomHumanoidSettings id: CentcomOfficial diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index a443ff502778..f8f2ef49e705 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -393,7 +393,7 @@ blacklist: components: - ZombieImmune - - InitialInfectedExempt + - AntagImmune briefing: text: zombie-patientzero-role-greeting color: Plum @@ -444,7 +444,7 @@ - type: entity parent: BaseTraitorRule - id: SleeperAgentsRule + id: SleeperAgents components: - type: StationEvent earliestStart: 30 @@ -457,13 +457,17 @@ - type: AlertLevelInterceptionRule - type: AntagSelection definitions: - - prefRoles: [ Traitor ] + - prefRoles: [ TraitorSleeper ] + fallbackRoles: [ Traitor ] min: 1 max: 2 playerRatio: 10 + blacklist: + components: + - AntagImmune mindComponents: - type: TraitorRole - prototype: Traitor + prototype: TraitorSleeper - type: entity id: MassHallucinations diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml index 88f80fd4f6a2..923a01146062 100644 --- a/Resources/Prototypes/GameRules/roundstart.yml +++ b/Resources/Prototypes/GameRules/roundstart.yml @@ -173,6 +173,9 @@ - prefRoles: [ Traitor ] max: 8 playerRatio: 10 + blacklist: + components: + - AntagImmune lateJoinAdditional: true mindComponents: - type: TraitorRole @@ -232,7 +235,7 @@ blacklist: components: - ZombieImmune - - InitialInfectedExempt + - AntagImmune briefing: text: zombie-patientzero-role-greeting color: Plum diff --git a/Resources/Prototypes/Roles/Antags/traitor.yml b/Resources/Prototypes/Roles/Antags/traitor.yml index e97ced1795e5..205f04b05ea5 100644 --- a/Resources/Prototypes/Roles/Antags/traitor.yml +++ b/Resources/Prototypes/Roles/Antags/traitor.yml @@ -6,6 +6,13 @@ objective: roles-antag-syndicate-agent-objective guides: [ Traitors ] +- type: antag + id: TraitorSleeper + name: roles-antag-syndicate-agent-sleeper-name + antagonist: true + setPreference: true + objective: roles-antag-syndicate-agent-sleeper-objective + # Syndicate Operative Outfit - Monkey - type: startingGear id: SyndicateOperativeGearMonkey