Files
OldThink/Content.Shared/Emoting/EmoteSystem.cs

21 lines
512 B
C#
Raw Normal View History

using Robust.Shared.GameObjects;
namespace Content.Shared.Emoting
{
public class EmoteSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<SharedEmotingComponent, EmoteAttemptEvent>(OnEmoteAttempt);
}
private void OnEmoteAttempt(EntityUid entity, SharedEmotingComponent component, EmoteAttemptEvent ev)
{
if (!component.Enabled)
ev.Cancel();
}
}
}