private void OnPreventCollide(EntityUid uid, PreventCollideComponent component, PreventCollideEvent args) { var otherUid = args.BodyB.Owner; if (component.Uid == otherUid) { args.Cancel(); } }
private void OnHandleState(EntityUid uid, PreventCollideComponent component, ref ComponentHandleState args) { if (args.Current is not PreventCollideComponentState state) { return; } component.Uid = state.Uid; }
private void OnGetState(EntityUid uid, PreventCollideComponent component, ref ComponentGetState args) { args.State = new PreventCollideComponentState(component); }
public PreventCollideComponentState(PreventCollideComponent component) { Uid = component.Uid; }