private void PreventCollision(EntityUid uid, ThrownItemComponent component, PreventCollideEvent args) { if (args.BodyB.Owner == component.Thrower) { args.Cancel(); } }
private void PreventCollision(EntityUid uid, SharedDoorComponent component, PreventCollideEvent args) { if (component.IsCrushing(args.BodyB.Owner)) { args.Cancel(); } }
private void PreventCollision(EntityUid uid, SharedProjectileComponent component, PreventCollideEvent args) { if (component.IgnoreShooter && args.BodyB.Owner.Uid == component.Shooter) { args.Cancel(); return; } }
private void OnPreventCollide(EntityUid uid, SharedDisposalUnitComponent component, PreventCollideEvent args) { var otherBody = args.BodyB.Owner; // Items dropped shouldn't collide but items thrown should if (EntityManager.HasComponent <SharedItemComponent>(otherBody) && !EntityManager.HasComponent <ThrownItemComponent>(otherBody)) { args.Cancel(); return; } if (component.RecentlyEjected.Contains(otherBody)) { args.Cancel(); } }
private void OnPreventCollide(EntityUid uid, PreventCollideComponent component, PreventCollideEvent args) { var otherUid = args.BodyB.Owner; if (component.Uid == otherUid) { args.Cancel(); } }
private void PreventCollision(EntityUid uid, SharedBuckleComponent component, PreventCollideEvent args) { if (args.BodyB.Owner != component.LastEntityBuckledTo) { return; } if (component.Buckled || component.DontCollide) { args.Cancel(); } }
private void PreventCollision(EntityUid uid, SharedBuckleComponent component, PreventCollideEvent args) { if (args.BodyB.Owner.Uid != component.LastEntityBuckledTo) { return; } component.IsOnStrapEntityThisFrame = true; if (component.Buckled || component.DontCollide) { args.Cancel(); } }
protected override bool PreventCollide(EntityUid uid, SharedSingularityComponent component, PreventCollideEvent args) { if (base.PreventCollide(uid, component, args)) { return(true); } var otherUid = args.BodyB.Owner; if (args.Cancelled) { return(true); } // If it's not cancelled then we'll cancel if we can't immediately destroy it on collision if (!CanDestroy(component, otherUid)) { args.Cancel(); } return(true); }