using Content.Server.Zombies; using Content.Shared.Chemistry.Reagent; using Robust.Shared.Configuration; using Robust.Shared.Prototypes; namespace Content.Server.Chemistry.ReagentEffects; public sealed partial class CureZombieInfection : ReagentEffect { [DataField] public bool Innoculate; protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) { if(Innoculate) return Loc.GetString("reagent-effect-guidebook-innoculate-zombie-infection", ("chance", Probability)); return Loc.GetString("reagent-effect-guidebook-cure-zombie-infection", ("chance", Probability)); } // Removes the Zombie Infection Components public override void Effect(ReagentEffectArgs args) { var entityManager = args.EntityManager; if (entityManager.HasComponent(args.SolutionEntity)) return; entityManager.RemoveComponent(args.SolutionEntity); entityManager.RemoveComponent(args.SolutionEntity); if (Innoculate) { entityManager.EnsureComponent(args.SolutionEntity); } } }