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); }
private void OnUnequipAttempt(EntityUid uid, StunnedComponent stunned, UnequipAttemptEvent args) { args.Cancel(); }