]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix initial infected transformation (#19735)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Fri, 8 Sep 2023 21:29:49 +0000 (17:29 -0400)
committerGitHub <noreply@github.com>
Fri, 8 Sep 2023 21:29:49 +0000 (17:29 -0400)
Content.Server/GameTicking/Rules/ZombieRuleSystem.cs
Content.Server/Roles/InitialInfectedRoleComponent.cs [new file with mode: 0644]
Content.Server/Roles/RoleSystem.cs

index 164c5148a27a02efa62758f46a56061d9920e45e..96d11fed940e94ea7a4eead92afec6ea1a31a1fa 100644 (file)
@@ -318,7 +318,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
 
             totalInfected++;
 
-            _roles.MindAddRole(mindId, new ZombieRoleComponent { PrototypeId = component.PatientZeroPrototypeId });
+            _roles.MindAddRole(mindId, new InitialInfectedRoleComponent { PrototypeId = component.PatientZeroPrototypeId });
 
             var pending = EnsureComp<PendingZombieComponent>(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 (file)
index 0000000..d8cc5fd
--- /dev/null
@@ -0,0 +1,9 @@
+using Content.Shared.Roles;
+
+namespace Content.Server.Roles;
+
+[RegisterComponent]
+public sealed partial class InitialInfectedRoleComponent : AntagonistRoleComponent
+{
+
+}
index 96f52150d939a4a134f33b3b3f41004d8067866f..12962b2b50daefc86241ec782d68ab038d96c092 100644 (file)
@@ -9,6 +9,7 @@ public sealed class RoleSystem : SharedRoleSystem
         // TODO make roles entities
         base.Initialize();
 
+        SubscribeAntagEvents<InitialInfectedRoleComponent>();
         SubscribeAntagEvents<NukeopsRoleComponent>();
         SubscribeAntagEvents<SubvertedSiliconRoleComponent>();
         SubscribeAntagEvents<TraitorRoleComponent>();