mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* 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>
27 lines
848 B
C#
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");
|
|
}
|
|
}
|