Exemple #1
0
 private void OnEmoteAttempt(EmoteAttemptEvent args)
 {
     if (!TryComp(args.Uid, out SharedEmotingComponent? emote) || !emote.Enabled)
     {
         args.Cancel();
     }
 }
        public bool CanEmote(EntityUid uid)
        {
            var ev = new EmoteAttemptEvent(uid);

            RaiseLocalEvent(uid, ev);

            return(!ev.Cancelled);
        }
        public bool CanEmote(IEntity entity)
        {
            var ev = new EmoteAttemptEvent(entity);

            RaiseLocalEvent(entity.Uid, ev);

            return(!ev.Cancelled);
        }
        public bool CanEmote(IEntity entity)
        {
            var ev = new EmoteAttemptEvent(entity);

            RaiseLocalEvent(entity.Uid, ev);

            foreach (var blocker in ev.Entity.GetAllComponents <IActionBlocker>())
            {
                if (!blocker.CanEmote())
                {
                    ev.Cancel();
                    break;
                }
            }

            return(!ev.Cancelled);
        }
 private void OnEmoteAttempt(EntityUid uid, DroneComponent component, EmoteAttemptEvent args)
 {
     // No.
     args.Cancel();
 }
 private void OnEmoteAttempt(EntityUid uid, MobStateComponent component, EmoteAttemptEvent args)
 {
     CheckAct(uid, component, args);
 }
 private void OnEmoteAttempt(EntityUid uid, SharedGhostComponent component, EmoteAttemptEvent args)
 {
     args.Cancel();
 }