remove: убран акшен Кричать
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user