Lint more const string prototypes (#18922)

This commit is contained in:
Vordenburg
2023-08-13 20:26:59 -04:00
committed by GitHub
parent 17808a54ef
commit 7582474f1a
32 changed files with 73 additions and 19 deletions

View File

@@ -4,20 +4,21 @@ namespace Content.Shared.Speech.EntitySystems;
public abstract class SharedStutteringSystem : EntitySystem
{
[ValidatePrototypeId<StatusEffectPrototype>]
public const string StutterKey = "Stutter";
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
[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);