private void OnWeldAttempt(EntityUid uid, DoorComponent component, WeldableAttemptEvent args) { if (component.CurrentlyCrushing.Count > 0) { args.Cancel(); return; } if (component.State != DoorState.Closed && component.State != DoorState.Welded) { args.Cancel(); } }
private void OnWeldableAttempt(EntityUid uid, EntityStorageComponent component, WeldableAttemptEvent args) { if (component.Open) { args.Cancel(); return; } if (component.Contents.Contains(args.User)) { var msg = Loc.GetString("entity-storage-component-already-contains-user-message"); _popupSystem.PopupEntity(msg, args.User, Filter.Entities(args.User)); args.Cancel(); } }