コード例 #1
0
 private void OnEmoteAttempt(EmoteAttemptEvent args)
 {
     if (!TryComp(args.Uid, out SharedEmotingComponent? emote) || !emote.Enabled)
     {
         args.Cancel();
     }
 }
コード例 #2
0
 private void OnEmoteAttempt(EmoteAttemptEvent ev)
 {
     if (!ev.Entity.HasComponent <SharedEmotingComponent>())
     {
         ev.Cancel();
     }
 }
コード例 #3
0
 private void OnEmoteAttempt(EntityUid entity, SharedEmotingComponent component, EmoteAttemptEvent ev)
 {
     if (!component.Enabled)
     {
         ev.Cancel();
     }
 }