2023-12-29 04:47:43 -08:00
|
|
|
using Content.Server.Zombies;
|
2024-06-30 05:43:43 +02:00
|
|
|
using Content.Shared.EntityEffects;
|
2023-12-29 04:47:43 -08:00
|
|
|
using Robust.Shared.Prototypes;
|
2024-05-26 00:07:18 +03:00
|
|
|
using Content.Shared.Zombies;
|
2023-12-28 20:45:42 -07:00
|
|
|
|
2024-06-30 05:43:43 +02:00
|
|
|
namespace Content.Server.EntityEffects.Effects;
|
2023-07-06 19:55:00 -07:00
|
|
|
|
2024-06-30 05:43:43 +02:00
|
|
|
public sealed partial class CauseZombieInfection : EntityEffect
|
2023-07-06 19:55:00 -07:00
|
|
|
{
|
|
|
|
|
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
|
2023-08-22 18:14:33 -07:00
|
|
|
=> Loc.GetString("reagent-effect-guidebook-cause-zombie-infection", ("chance", Probability));
|
2023-07-06 19:55:00 -07:00
|
|
|
|
|
|
|
|
// Adds the Zombie Infection Components
|
2024-06-30 05:43:43 +02:00
|
|
|
public override void Effect(EntityEffectBaseArgs args)
|
2023-07-06 19:55:00 -07:00
|
|
|
{
|
|
|
|
|
var entityManager = args.EntityManager;
|
2024-06-30 05:43:43 +02:00
|
|
|
entityManager.EnsureComponent<ZombifyOnDeathComponent>(args.TargetEntity);
|
|
|
|
|
entityManager.EnsureComponent<PendingZombieComponent>(args.TargetEntity);
|
2023-07-06 19:55:00 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|