2021-10-17 01:23:31 +02:00
|
|
|
using Content.Shared.StatusEffect;
|
|
|
|
|
|
2023-05-05 21:46:52 +08:00
|
|
|
namespace Content.Shared.Speech.EntitySystems;
|
|
|
|
|
|
|
|
|
|
public abstract class SharedStutteringSystem : EntitySystem
|
2021-10-17 01:23:31 +02:00
|
|
|
{
|
2023-08-13 20:26:59 -04:00
|
|
|
[ValidatePrototypeId<StatusEffectPrototype>]
|
2023-05-05 21:46:52 +08:00
|
|
|
public const string StutterKey = "Stutter";
|
|
|
|
|
|
2023-08-13 20:26:59 -04:00
|
|
|
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
|
2023-05-05 21:46:52 +08:00
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
|
{
|
|
|
|
|
}
|
2023-08-13 20:26:59 -04:00
|
|
|
|
2023-05-05 21:46:52 +08:00
|
|
|
public virtual void DoRemoveStutterTime(EntityUid uid, double timeRemoved)
|
|
|
|
|
{
|
|
|
|
|
_statusEffectsSystem.TryRemoveTime(uid, StutterKey, TimeSpan.FromSeconds(timeRemoved));
|
|
|
|
|
}
|
2023-08-13 20:26:59 -04:00
|
|
|
|
2023-05-05 21:46:52 +08:00
|
|
|
public void DoRemoveStutter(EntityUid uid, double timeRemoved)
|
2021-10-17 01:23:31 +02:00
|
|
|
{
|
2023-05-05 21:46:52 +08:00
|
|
|
_statusEffectsSystem.TryRemoveStatusEffect(uid, StutterKey);
|
2021-10-17 01:23:31 +02:00
|
|
|
}
|
|
|
|
|
}
|