mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
19 lines
466 B
C#
19 lines
466 B
C#
namespace Content.Shared.Emoting
|
|
{
|
|
public sealed class EmoteSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<EmoteAttemptEvent>(OnEmoteAttempt);
|
|
}
|
|
|
|
private void OnEmoteAttempt(EmoteAttemptEvent args)
|
|
{
|
|
if (!TryComp(args.Uid, out SharedEmotingComponent? emote) || !emote.Enabled)
|
|
args.Cancel();
|
|
}
|
|
}
|
|
}
|