remove: убран акшен Кричать

This commit is contained in:
Remuchi
2024-03-08 23:06:46 +07:00
parent ae812dde8f
commit 36c40bafd7
7 changed files with 2 additions and 86 deletions

View File

@@ -12,12 +12,12 @@ namespace Content.Server.Speech.Muting
public sealed class MutingSystem : EntitySystem
{
[Dependency] private readonly PopupSystem _popupSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MutedComponent, SpeakAttemptEvent>(OnSpeakAttempt);
SubscribeLocalEvent<MutedComponent, EmoteEvent>(OnEmote, before: new[] { typeof(VocalSystem) });
SubscribeLocalEvent<MutedComponent, ScreamActionEvent>(OnScreamAction, before: new[] { typeof(VocalSystem) });
}
private void OnEmote(EntityUid uid, MutedComponent component, ref EmoteEvent args)
@@ -30,20 +30,6 @@ namespace Content.Server.Speech.Muting
args.Handled = true;
}
private void OnScreamAction(EntityUid uid, MutedComponent component, ScreamActionEvent args)
{
if (args.Handled)
return;
if (HasComp<MimePowersComponent>(uid))
_popupSystem.PopupEntity(Loc.GetString("mime-cant-speak"), uid, uid);
else
_popupSystem.PopupEntity(Loc.GetString("speech-muted"), uid, uid);
args.Handled = true;
}
private void OnSpeakAttempt(EntityUid uid, MutedComponent component, SpeakAttemptEvent args)
{
// TODO something better than this.
@@ -58,4 +44,4 @@ namespace Content.Server.Speech.Muting
args.Cancel();
}
}
}
}