Files
Delta-v/Content.Server/_DV/Storage/EntitySystems/MouthStorageSystem.cs
T
deltanedasanddeltanedas ec94579ebc the great namespace refactor (#2574)
* refactor DeltaV/deltav resources to _DV

* change DeltaV namespaces to _DV

* add space before all DeltaV comments

* update xamls

* fix and move arena parallax to _DV

* more fix

* refactor even more stuff

* fix the grid fills

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2025-01-01 07:50:34 +00:00

27 lines
848 B
C#

using Content.Server.Speech;
using Content.Server.Speech.EntitySystems;
using Content.Shared._DV.Storage.Components;
using Content.Shared._DV.Storage.EntitySystems;
using Content.Shared.Storage;
namespace Content.Server._DV.Storage.EntitySystems;
public sealed class MouthStorageSystem : SharedMouthStorageSystem
{
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MouthStorageComponent, AccentGetEvent>(OnAccent);
}
// Force you to mumble if you have items in your mouth
private void OnAccent(EntityUid uid, MouthStorageComponent component, AccentGetEvent args)
{
if (IsMouthBlocked(component))
args.Message = _replacement.ApplyReplacements(args.Message, "mumble");
}
}