* Oh the possibilities * Merge fixes * Forgot to remote LavaSystem oops * Changed EntityEffectArgs to EntityEffectBaseArgs and EntityEffectReagentArgs * Throw exception for unimplemented effectargs * Remove Json and overrideable datafields * Fix test issues * Actually fix the compiling issue * Fix comments and remove EntityEffectArgs (no longer used, replaced with EntityEffectBaseArgs)
22 lines
794 B
C#
22 lines
794 B
C#
using Content.Server.Zombies;
|
|
using Content.Shared.EntityEffects;
|
|
using Robust.Shared.Prototypes;
|
|
using Content.Shared.Zombies;
|
|
|
|
namespace Content.Server.EntityEffects.Effects;
|
|
|
|
public sealed partial class CauseZombieInfection : EntityEffect
|
|
{
|
|
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
|
|
=> Loc.GetString("reagent-effect-guidebook-cause-zombie-infection", ("chance", Probability));
|
|
|
|
// Adds the Zombie Infection Components
|
|
public override void Effect(EntityEffectBaseArgs args)
|
|
{
|
|
var entityManager = args.EntityManager;
|
|
entityManager.EnsureComponent<ZombifyOnDeathComponent>(args.TargetEntity);
|
|
entityManager.EnsureComponent<PendingZombieComponent>(args.TargetEntity);
|
|
}
|
|
}
|
|
|