ERT, DeathSquad and Central Command Officer Inital Infected immunity (#23601)

II immunity

Make ERT, DeathSquad and Central Command officers immune to being II
This commit is contained in:
Simon
2024-01-27 03:56:09 +01:00
committed by GitHub
parent 76a76eb186
commit bb828af6d3
3 changed files with 32 additions and 0 deletions

View 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;

View File

@@ -0,0 +1,7 @@
namespace Content.Server.Zombies;
[RegisterComponent]
public partial class InitialInfectedExemptComponent : Component
{
}

View 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
@@ -98,6 +104,7 @@
components:
- type: RandomHumanoidSpawner
settings: ERTLeaderEVALecter
- type: InitialInfectedExempt
- type: randomHumanoidSettings
id: ERTLeaderEVALecter
@@ -110,6 +117,7 @@
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [ ERTLeaderGearEVALecter ]
- type: InitialInfectedExempt
## ERT Janitor
@@ -144,6 +152,7 @@
- NamesLastMilitary
- type: Loadout
prototypes: [ ERTJanitorGear ]
- type: InitialInfectedExempt
- type: entity
id: RandomHumanoidSpawnerERTJanitorEVA
@@ -168,6 +177,7 @@
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [ ERTJanitorGearEVA ]
- type: InitialInfectedExempt
## ERT Engineer
@@ -202,6 +212,7 @@
- NamesLastMilitary
- type: Loadout
prototypes: [ ERTEngineerGear ]
- type: InitialInfectedExempt
- type: entity
id: RandomHumanoidSpawnerERTEngineerEVA
@@ -226,6 +237,7 @@
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [ ERTEngineerGearEVA ]
- type: InitialInfectedExempt
## ERT Security
@@ -260,6 +272,7 @@
- NamesLastMilitary
- type: Loadout
prototypes: [ ERTSecurityGear ]
- type: InitialInfectedExempt
- type: entity
id: RandomHumanoidSpawnerERTSecurityEVA
@@ -284,6 +297,7 @@
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [ ERTSecurityGearEVA ]
- type: InitialInfectedExempt
- type: entity
id: RandomHumanoidSpawnerERTSecurityEVALecter
@@ -304,6 +318,7 @@
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [ ERTSecurityGearEVALecter ]
- type: InitialInfectedExempt
## ERT Medic
@@ -338,6 +353,7 @@
- NamesLastMilitary
- type: Loadout
prototypes: [ ERTMedicalGear ]
- type: InitialInfectedExempt
- type: entity
id: RandomHumanoidSpawnerERTMedicalEVA
@@ -362,6 +378,7 @@
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [ ERTMedicalGearEVA ]
- type: InitialInfectedExempt
## CBURN
@@ -375,6 +392,7 @@
state: cburn
- type: RandomHumanoidSpawner
settings: CBURNAgent
- type: InitialInfectedExempt
- type: randomHumanoidSettings
id: CBURNAgent
@@ -390,6 +408,7 @@
nameSegments:
- NamesFirstMilitary
- NamesLastMilitary
- type: InitialInfectedExempt
## Central Command
- type: entity
@@ -401,6 +420,7 @@
state: centcom
- type: RandomHumanoidSpawner
settings: CentcomOfficial
- type: InitialInfectedExempt
- type: randomHumanoidSettings
id: CentcomOfficial
@@ -412,6 +432,7 @@
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [ CentcomGear ]
- type: InitialInfectedExempt
## Syndicate