Files
tbd-station-14/Content.Shared/Speech/EntitySystems/SharedStutteringSystem.cs
Tayrtahn c565b44965 Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814)
* The easy ones

* For certain values of easy

* Easy test

* Hair

* Fix sandbox violations

* Sort usings
2025-07-07 21:57:05 +02:00

27 lines
924 B
C#

using Content.Shared.StatusEffect;
using Robust.Shared.Prototypes;
namespace Content.Shared.Speech.EntitySystems;
public abstract class SharedStutteringSystem : EntitySystem
{
public static readonly ProtoId<StatusEffectPrototype> StutterKey = "Stutter";
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
// For code in shared... I imagine we ain't getting accent prediction anytime soon so let's not bother.
public virtual void DoStutter(EntityUid uid, TimeSpan time, bool refresh, StatusEffectsComponent? status = null)
{
}
public virtual void DoRemoveStutterTime(EntityUid uid, double timeRemoved)
{
_statusEffectsSystem.TryRemoveTime(uid, StutterKey, TimeSpan.FromSeconds(timeRemoved));
}
public void DoRemoveStutter(EntityUid uid, double timeRemoved)
{
_statusEffectsSystem.TryRemoveStatusEffect(uid, StutterKey);
}
}