From d69738a9f4526f2f321eb0c673661d0d1b6f5c77 Mon Sep 17 00:00:00 2001 From: IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com> Date: Fri, 18 Apr 2025 20:38:33 -0400 Subject: [PATCH] Fix two zombie bugs (#34472) * fix two zombie bugs * add comment --- Content.Server/Zombies/ZombieSystem.cs | 8 +++++++- Content.Shared/Zombies/PendingZombieComponent.cs | 2 +- Resources/Prototypes/Entities/Mobs/Species/vox.yml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs index e34ecb4ad5..054bd0f6ec 100644 --- a/Content.Server/Zombies/ZombieSystem.cs +++ b/Content.Server/Zombies/ZombieSystem.cs @@ -87,6 +87,13 @@ namespace Content.Server.Zombies private void OnPendingMapInit(EntityUid uid, IncurableZombieComponent component, MapInitEvent args) { _actions.AddAction(uid, ref component.Action, component.ZombifySelfActionPrototype); + + if (HasComp(uid) || HasComp(uid)) + return; + + EnsureComp(uid, out PendingZombieComponent pendingComp); + + pendingComp.GracePeriod = _random.Next(pendingComp.MinInitialInfectedGrace, pendingComp.MaxInitialInfectedGrace); } private void OnPendingMapInit(EntityUid uid, PendingZombieComponent component, MapInitEvent args) @@ -98,7 +105,6 @@ namespace Content.Server.Zombies } component.NextTick = _timing.CurTime + TimeSpan.FromSeconds(1f); - component.GracePeriod = _random.Next(component.MinInitialInfectedGrace, component.MaxInitialInfectedGrace); } public override void Update(float frameTime) diff --git a/Content.Shared/Zombies/PendingZombieComponent.cs b/Content.Shared/Zombies/PendingZombieComponent.cs index 0fb61c84df..b199edeb00 100644 --- a/Content.Shared/Zombies/PendingZombieComponent.cs +++ b/Content.Shared/Zombies/PendingZombieComponent.cs @@ -17,7 +17,7 @@ public sealed partial class PendingZombieComponent : Component { DamageDict = new () { - { "Poison", 0.2 }, + { "Poison", 0.4 }, } }; diff --git a/Resources/Prototypes/Entities/Mobs/Species/vox.yml b/Resources/Prototypes/Entities/Mobs/Species/vox.yml index dc93dc8fdf..4703bfd06b 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/vox.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/vox.yml @@ -43,7 +43,7 @@ damage: types: Heat: -0.07 - Poison: -0.2 + Poison: -0.2 # needs to be less than the PendingZombieComponent does or they never become zombies by the disease. groups: Brute: -0.07 - type: DamageVisuals -- 2.51.2