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)) if (player.AttachedEntity == null || !HasComp<HumanoidAppearanceComponent>(player.AttachedEntity) || HasComp<ZombieImmuneComponent>(player.AttachedEntity))
continue; continue;
if (HasComp<InitialInfectedExemptComponent>(player.AttachedEntity))
continue; // used (for example) on ERT
playerList.Add(player); playerList.Add(player);
var pref = (HumanoidCharacterProfile) _prefs.GetPreferences(player.UserId).SelectedCharacter; 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 - NamesLastMilitary
- type: RandomHumanoidSpawner - type: RandomHumanoidSpawner
settings: DeathSquad settings: DeathSquad
- type: InitialInfectedExempt
- type: randomHumanoidSettings - type: randomHumanoidSettings
id: DeathSquad id: DeathSquad
@@ -32,6 +33,7 @@
nameSegments: nameSegments:
- NamesFirstMilitaryLeader - NamesFirstMilitaryLeader
- NamesLastMilitary - NamesLastMilitary
- type: InitialInfectedExempt
## ERT Leader ## ERT Leader
@@ -50,6 +52,7 @@
- NamesLastMilitary - NamesLastMilitary
- type: RandomHumanoidSpawner - type: RandomHumanoidSpawner
settings: ERTLeader settings: ERTLeader
- type: InitialInfectedExempt
- type: randomHumanoidSettings - type: randomHumanoidSettings
id: ERTLeader id: ERTLeader
@@ -66,6 +69,7 @@
nameSegments: nameSegments:
- NamesFirstMilitaryLeader - NamesFirstMilitaryLeader
- NamesLastMilitary - NamesLastMilitary
- type: InitialInfectedExempt
- type: entity - type: entity
id: RandomHumanoidSpawnerERTLeaderEVA id: RandomHumanoidSpawnerERTLeaderEVA
@@ -78,6 +82,7 @@
state: ertleadereva state: ertleadereva
- type: RandomHumanoidSpawner - type: RandomHumanoidSpawner
settings: ERTLeaderEVA settings: ERTLeaderEVA
- type: InitialInfectedExempt
- type: randomHumanoidSettings - type: randomHumanoidSettings
id: ERTLeaderEVA id: ERTLeaderEVA
@@ -90,6 +95,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ ERTLeaderGearEVA ] prototypes: [ ERTLeaderGearEVA ]
- type: InitialInfectedExempt
- type: entity - type: entity
id: RandomHumanoidSpawnerERTLeaderEVALecter id: RandomHumanoidSpawnerERTLeaderEVALecter
@@ -98,6 +104,7 @@
components: components:
- type: RandomHumanoidSpawner - type: RandomHumanoidSpawner
settings: ERTLeaderEVALecter settings: ERTLeaderEVALecter
- type: InitialInfectedExempt
- type: randomHumanoidSettings - type: randomHumanoidSettings
id: ERTLeaderEVALecter id: ERTLeaderEVALecter
@@ -110,6 +117,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ ERTLeaderGearEVALecter ] prototypes: [ ERTLeaderGearEVALecter ]
- type: InitialInfectedExempt
## ERT Janitor ## ERT Janitor
@@ -144,6 +152,7 @@
- NamesLastMilitary - NamesLastMilitary
- type: Loadout - type: Loadout
prototypes: [ ERTJanitorGear ] prototypes: [ ERTJanitorGear ]
- type: InitialInfectedExempt
- type: entity - type: entity
id: RandomHumanoidSpawnerERTJanitorEVA id: RandomHumanoidSpawnerERTJanitorEVA
@@ -168,6 +177,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ ERTJanitorGearEVA ] prototypes: [ ERTJanitorGearEVA ]
- type: InitialInfectedExempt
## ERT Engineer ## ERT Engineer
@@ -202,6 +212,7 @@
- NamesLastMilitary - NamesLastMilitary
- type: Loadout - type: Loadout
prototypes: [ ERTEngineerGear ] prototypes: [ ERTEngineerGear ]
- type: InitialInfectedExempt
- type: entity - type: entity
id: RandomHumanoidSpawnerERTEngineerEVA id: RandomHumanoidSpawnerERTEngineerEVA
@@ -226,6 +237,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ ERTEngineerGearEVA ] prototypes: [ ERTEngineerGearEVA ]
- type: InitialInfectedExempt
## ERT Security ## ERT Security
@@ -260,6 +272,7 @@
- NamesLastMilitary - NamesLastMilitary
- type: Loadout - type: Loadout
prototypes: [ ERTSecurityGear ] prototypes: [ ERTSecurityGear ]
- type: InitialInfectedExempt
- type: entity - type: entity
id: RandomHumanoidSpawnerERTSecurityEVA id: RandomHumanoidSpawnerERTSecurityEVA
@@ -284,6 +297,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ ERTSecurityGearEVA ] prototypes: [ ERTSecurityGearEVA ]
- type: InitialInfectedExempt
- type: entity - type: entity
id: RandomHumanoidSpawnerERTSecurityEVALecter id: RandomHumanoidSpawnerERTSecurityEVALecter
@@ -304,6 +318,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ ERTSecurityGearEVALecter ] prototypes: [ ERTSecurityGearEVALecter ]
- type: InitialInfectedExempt
## ERT Medic ## ERT Medic
@@ -338,6 +353,7 @@
- NamesLastMilitary - NamesLastMilitary
- type: Loadout - type: Loadout
prototypes: [ ERTMedicalGear ] prototypes: [ ERTMedicalGear ]
- type: InitialInfectedExempt
- type: entity - type: entity
id: RandomHumanoidSpawnerERTMedicalEVA id: RandomHumanoidSpawnerERTMedicalEVA
@@ -362,6 +378,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ ERTMedicalGearEVA ] prototypes: [ ERTMedicalGearEVA ]
- type: InitialInfectedExempt
## CBURN ## CBURN
@@ -375,6 +392,7 @@
state: cburn state: cburn
- type: RandomHumanoidSpawner - type: RandomHumanoidSpawner
settings: CBURNAgent settings: CBURNAgent
- type: InitialInfectedExempt
- type: randomHumanoidSettings - type: randomHumanoidSettings
id: CBURNAgent id: CBURNAgent
@@ -390,6 +408,7 @@
nameSegments: nameSegments:
- NamesFirstMilitary - NamesFirstMilitary
- NamesLastMilitary - NamesLastMilitary
- type: InitialInfectedExempt
## Central Command ## Central Command
- type: entity - type: entity
@@ -401,6 +420,7 @@
state: centcom state: centcom
- type: RandomHumanoidSpawner - type: RandomHumanoidSpawner
settings: CentcomOfficial settings: CentcomOfficial
- type: InitialInfectedExempt
- type: randomHumanoidSettings - type: randomHumanoidSettings
id: CentcomOfficial id: CentcomOfficial
@@ -412,6 +432,7 @@
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: Loadout - type: Loadout
prototypes: [ CentcomGear ] prototypes: [ CentcomGear ]
- type: InitialInfectedExempt
## Syndicate ## Syndicate