using Content.Shared.Traits.Assorted;
using Robust.Shared.Prototypes;
namespace Content.Shared.EntityEffects.Effects;
///
/// Resets the narcolepsy timer on a given entity.
/// The new duration of the timer is modified by scale.
///
///
public sealed partial class ResetNarcolepsyEntityEffectSystem : EntityEffectSystem
{
[Dependency] private readonly NarcolepsySystem _narcolepsy = default!;
protected override void Effect(Entity entity, ref EntityEffectEvent args)
{
var timer = args.Effect.TimerReset * args.Scale;
_narcolepsy.AdjustNarcolepsyTimer(entity.AsNullable(), timer);
}
}
///
public sealed partial class ResetNarcolepsy : EntityEffectBase
{
///
/// The time we set our narcolepsy timer to.
///
[DataField("TimerReset")]
public TimeSpan TimerReset = TimeSpan.FromSeconds(600);
public override string EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
Loc.GetString("entity-effect-guidebook-reset-narcolepsy", ("chance", Probability));
}