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);
        }
Пример #2
0
 private void OnUnequipAttempt(EntityUid uid, StunnedComponent stunned, UnequipAttemptEvent args)
 {
     args.Cancel();
 }