2021-06-19 10:03:24 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Emoting
|
|
|
|
|
|
{
|
|
|
|
|
|
public class EmoteSystem : EntitySystem
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
2021-09-15 16:17:09 +02:00
|
|
|
|
SubscribeLocalEvent<SharedEmotingComponent, EmoteAttemptEvent>(OnEmoteAttempt);
|
2021-06-19 10:03:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-09-15 16:17:09 +02:00
|
|
|
|
private void OnEmoteAttempt(EntityUid entity, SharedEmotingComponent component, EmoteAttemptEvent ev)
|
2021-06-19 10:03:24 +02:00
|
|
|
|
{
|
2021-09-15 16:17:09 +02:00
|
|
|
|
if (!component.Enabled)
|
2021-06-19 10:03:24 +02:00
|
|
|
|
ev.Cancel();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|