Fix initial infected transformation (#19735)

This commit is contained in:
Nemanja
2023-09-08 17:29:49 -04:00
committed by GitHub
parent de9354a562
commit cc5e185c6e
3 changed files with 11 additions and 1 deletions

View File

@@ -318,7 +318,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
totalInfected++; totalInfected++;
_roles.MindAddRole(mindId, new ZombieRoleComponent { PrototypeId = component.PatientZeroPrototypeId }); _roles.MindAddRole(mindId, new InitialInfectedRoleComponent { PrototypeId = component.PatientZeroPrototypeId });
var pending = EnsureComp<PendingZombieComponent>(ownedEntity); var pending = EnsureComp<PendingZombieComponent>(ownedEntity);
pending.GracePeriod = _random.Next(component.MinInitialInfectedGrace, component.MaxInitialInfectedGrace); pending.GracePeriod = _random.Next(component.MinInitialInfectedGrace, component.MaxInitialInfectedGrace);

View File

@@ -0,0 +1,9 @@
using Content.Shared.Roles;
namespace Content.Server.Roles;
[RegisterComponent]
public sealed partial class InitialInfectedRoleComponent : AntagonistRoleComponent
{
}

View File

@@ -9,6 +9,7 @@ public sealed class RoleSystem : SharedRoleSystem
// TODO make roles entities // TODO make roles entities
base.Initialize(); base.Initialize();
SubscribeAntagEvents<InitialInfectedRoleComponent>();
SubscribeAntagEvents<NukeopsRoleComponent>(); SubscribeAntagEvents<NukeopsRoleComponent>();
SubscribeAntagEvents<SubvertedSiliconRoleComponent>(); SubscribeAntagEvents<SubvertedSiliconRoleComponent>();
SubscribeAntagEvents<TraitorRoleComponent>(); SubscribeAntagEvents<TraitorRoleComponent>();