From cc5e185c6ed6bf46f2146cad5b1cf5dd4143fccf Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Fri, 8 Sep 2023 17:29:49 -0400 Subject: [PATCH] Fix initial infected transformation (#19735) --- Content.Server/GameTicking/Rules/ZombieRuleSystem.cs | 2 +- Content.Server/Roles/InitialInfectedRoleComponent.cs | 9 +++++++++ Content.Server/Roles/RoleSystem.cs | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Content.Server/Roles/InitialInfectedRoleComponent.cs diff --git a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs index 164c5148a2..96d11fed94 100644 --- a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs @@ -318,7 +318,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem totalInfected++; - _roles.MindAddRole(mindId, new ZombieRoleComponent { PrototypeId = component.PatientZeroPrototypeId }); + _roles.MindAddRole(mindId, new InitialInfectedRoleComponent { PrototypeId = component.PatientZeroPrototypeId }); var pending = EnsureComp(ownedEntity); pending.GracePeriod = _random.Next(component.MinInitialInfectedGrace, component.MaxInitialInfectedGrace); diff --git a/Content.Server/Roles/InitialInfectedRoleComponent.cs b/Content.Server/Roles/InitialInfectedRoleComponent.cs new file mode 100644 index 0000000000..d8cc5fd04b --- /dev/null +++ b/Content.Server/Roles/InitialInfectedRoleComponent.cs @@ -0,0 +1,9 @@ +using Content.Shared.Roles; + +namespace Content.Server.Roles; + +[RegisterComponent] +public sealed partial class InitialInfectedRoleComponent : AntagonistRoleComponent +{ + +} diff --git a/Content.Server/Roles/RoleSystem.cs b/Content.Server/Roles/RoleSystem.cs index 96f52150d9..12962b2b50 100644 --- a/Content.Server/Roles/RoleSystem.cs +++ b/Content.Server/Roles/RoleSystem.cs @@ -9,6 +9,7 @@ public sealed class RoleSystem : SharedRoleSystem // TODO make roles entities base.Initialize(); + SubscribeAntagEvents(); SubscribeAntagEvents(); SubscribeAntagEvents(); SubscribeAntagEvents();