using Content.Shared.Atmos.Rotting; using Robust.Shared.Prototypes; namespace Content.Shared.EntityEffects.Effects.Body; /// /// Reduces the rotting timer on an entity by a number of seconds, modified by scale. /// This cannot increase the amount of seconds a body has rotted. /// /// public sealed partial class ReduceRottingEntityEffectSystem : EntityEffectSystem { [Dependency] private readonly SharedRottingSystem _rotting = default!; protected override void Effect(Entity entity, ref EntityEffectEvent args) { var amount = args.Effect.Seconds * args.Scale; _rotting.ReduceAccumulator(entity, amount); } } /// public sealed partial class ReduceRotting : EntityEffectBase { /// /// Number of seconds removed from the rotting timer. /// [DataField] public TimeSpan Seconds = TimeSpan.FromSeconds(10); public override string? EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) => Loc.GetString("entity-effect-guidebook-reduce-rotting", ("chance", Probability), ("time", Seconds.TotalSeconds)); }