mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00: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();
|
|
}
|
|
}
|
|
}
|