]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
ERT, DeathSquad and Central Command Officer Inital Infected immunity (#23601)
authorSimon <63975668+Simyon264@users.noreply.github.com>
Sat, 27 Jan 2024 02:56:09 +0000 (03:56 +0100)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 02:56:09 +0000 (21:56 -0500)
II immunity

Make ERT, DeathSquad and Central Command officers immune to being II

Content.Server/GameTicking/Rules/ZombieRuleSystem.cs
Content.Server/Zombies/InitialInfectedExemptComponent.cs [new file with mode: 0644]
Resources/Prototypes/Entities/Mobs/Player/humanoid.yml

index 20cfd11a16772c260a1ee7bcaf44628b890e1b31..886ff965c722a6cba6e337453ce35a5449f80bf4 100644 (file)
@@ -273,6 +273,10 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
         {
             if (player.AttachedEntity == null || !HasComp<HumanoidAppearanceComponent>(player.AttachedEntity) || HasComp<ZombieImmuneComponent>(player.AttachedEntity))
                 continue;
+
+            if (HasComp<InitialInfectedExemptComponent>(player.AttachedEntity))
+                continue; // used (for example) on ERT
+
             playerList.Add(player);
 
             var pref = (HumanoidCharacterProfile) _prefs.GetPreferences(player.UserId).SelectedCharacter;
diff --git a/Content.Server/Zombies/InitialInfectedExemptComponent.cs b/Content.Server/Zombies/InitialInfectedExemptComponent.cs
new file mode 100644 (file)
index 0000000..4607793
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Content.Server.Zombies;
+
+[RegisterComponent]
+public partial class InitialInfectedExemptComponent : Component
+{
+
+}
index a91bce48993e0815697a976951c06007a5660789..b0a2571875e5ec7590787315837182c378f1287b 100644 (file)
@@ -16,6 +16,7 @@
         - NamesLastMilitary
     - type: RandomHumanoidSpawner
       settings: DeathSquad
+    - type: InitialInfectedExempt
 
 - type: randomHumanoidSettings
   id: DeathSquad
@@ -32,6 +33,7 @@
       nameSegments:
         - NamesFirstMilitaryLeader
         - NamesLastMilitary
+    - type: InitialInfectedExempt
 
 
 ## ERT Leader
@@ -50,6 +52,7 @@
       - NamesLastMilitary
     - type: RandomHumanoidSpawner
       settings: ERTLeader
+    - type: InitialInfectedExempt
 
 - type: randomHumanoidSettings
   id: ERTLeader
@@ -66,6 +69,7 @@
       nameSegments:
       - NamesFirstMilitaryLeader
       - NamesLastMilitary
+    - type: InitialInfectedExempt
 
 - type: entity
   id: RandomHumanoidSpawnerERTLeaderEVA
@@ -78,6 +82,7 @@
       state: ertleadereva
     - type: RandomHumanoidSpawner
       settings: ERTLeaderEVA
+    - type: InitialInfectedExempt
 
 - type: randomHumanoidSettings
   id: ERTLeaderEVA
@@ -90,6 +95,7 @@
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ ERTLeaderGearEVA ]
+    - type: InitialInfectedExempt
 
 - type: entity
   id: RandomHumanoidSpawnerERTLeaderEVALecter
   components:
     - type: RandomHumanoidSpawner
       settings: ERTLeaderEVALecter
+    - type: InitialInfectedExempt
 
 - type: randomHumanoidSettings
   id: ERTLeaderEVALecter
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ ERTLeaderGearEVALecter ]
+    - type: InitialInfectedExempt
 
 ## ERT Janitor
 
       - NamesLastMilitary
     - type: Loadout
       prototypes: [ ERTJanitorGear ]
+    - type: InitialInfectedExempt
 
 - type: entity
   id: RandomHumanoidSpawnerERTJanitorEVA
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ ERTJanitorGearEVA ]
+    - type: InitialInfectedExempt
 
 ## ERT Engineer
 
       - NamesLastMilitary
     - type: Loadout
       prototypes: [ ERTEngineerGear ]
+    - type: InitialInfectedExempt
 
 - type: entity
   id: RandomHumanoidSpawnerERTEngineerEVA
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ ERTEngineerGearEVA ]
+    - type: InitialInfectedExempt
 
 ## ERT Security
 
       - NamesLastMilitary
     - type: Loadout
       prototypes: [ ERTSecurityGear ]
+    - type: InitialInfectedExempt
 
 - type: entity
   id: RandomHumanoidSpawnerERTSecurityEVA
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ ERTSecurityGearEVA ]
+    - type: InitialInfectedExempt
 
 - type: entity
   id: RandomHumanoidSpawnerERTSecurityEVALecter
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ ERTSecurityGearEVALecter ]
+    - type: InitialInfectedExempt
 
 ## ERT Medic
 
       - NamesLastMilitary
     - type: Loadout
       prototypes: [ ERTMedicalGear ]
+    - type: InitialInfectedExempt
 
 - type: entity
   id: RandomHumanoidSpawnerERTMedicalEVA
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ ERTMedicalGearEVA ]
+    - type: InitialInfectedExempt
 
 ## CBURN
 
       state: cburn
     - type: RandomHumanoidSpawner
       settings: CBURNAgent
+    - type: InitialInfectedExempt
 
 - type: randomHumanoidSettings
   id: CBURNAgent
       nameSegments:
       - NamesFirstMilitary
       - NamesLastMilitary
+    - type: InitialInfectedExempt
 ## Central Command
 
 - type: entity
       state: centcom
     - type: RandomHumanoidSpawner
       settings: CentcomOfficial
+    - type: InitialInfectedExempt
 
 - type: randomHumanoidSettings
   id: CentcomOfficial
     - type: GhostTakeoverAvailable
     - type: Loadout
       prototypes: [ CentcomGear ]
+    - type: InitialInfectedExempt
 
 ## Syndicate