A few trait fixes (#16062)
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
namespace Content.Shared.Speech.Muting
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class MutedComponent : Component
|
||||
{}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Shared.Speech.Muting
|
||||
{
|
||||
public sealed class MutingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<MutedComponent, SpeakAttemptEvent>(OnSpeakAttempt);
|
||||
}
|
||||
|
||||
private void OnSpeakAttempt(EntityUid uid, MutedComponent component, SpeakAttemptEvent args)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("speech-muted"), uid, uid);
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user