Пример #1
0
        public bool CanUnequip(EntityUid uid)
        {
            var ev = new UnequipAttemptEvent(uid);

            RaiseLocalEvent(uid, ev);

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

            RaiseLocalEvent(entity.Uid, ev);

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

            RaiseLocalEvent(entity.Uid, ev);

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

            return(!ev.Cancelled);
        }
Пример #4
0
 private void OnUnequipAttempt(EntityUid uid, StunnedComponent stunned, UnequipAttemptEvent args)
 {
     args.Cancel();
 }
 private void OnUnequipAttempt(EntityUid uid, MobStateComponent component, UnequipAttemptEvent args)
 {
     CheckAct(uid, component, args);
 }
 private void OnUnequipAttempt(EntityUid uid, SharedCuffableComponent component, UnequipAttemptEvent args)
 {
     CheckAct(uid, component, args);
 }