private void OnPickupAttempt(EntityUid uid, SharedGhostComponent component, PickupAttemptEvent args) { if (!component.CanGhostInteract) { args.Cancel(); } }
public bool CanPickup(EntityUid uid) { var ev = new PickupAttemptEvent(uid); RaiseLocalEvent(uid, ev); return(!ev.Cancelled); }
public bool CanPickup(IEntity entity) { var ev = new PickupAttemptEvent(entity); RaiseLocalEvent(entity.Uid, ev); return(!ev.Cancelled); }
public bool CanPickup(EntityUid user, EntityUid item) { var userEv = new PickupAttemptEvent(user, item); RaiseLocalEvent(user, userEv, false); if (userEv.Cancelled) { return(false); } var itemEv = new GettingPickedUpAttemptEvent(user, item); RaiseLocalEvent(item, itemEv, false); return(!itemEv.Cancelled); }
public bool CanPickup(IEntity entity) { var ev = new PickupAttemptEvent(entity); RaiseLocalEvent(entity.Uid, ev); foreach (var blocker in ev.Entity.GetAllComponents <IActionBlocker>()) { if (!blocker.CanPickup()) { ev.Cancel(); break; } } return(!ev.Cancelled); }
private void OnPickupAttempt(EntityUid uid, SharedCuffableComponent component, PickupAttemptEvent args) { CheckAct(uid, component, args); }
private void OnPickupAttempt(EntityUid uid, StunnedComponent stunned, PickupAttemptEvent args) { args.Cancel(); }
private void OnPickupAttempt(EntityUid uid, MobStateComponent component, PickupAttemptEvent args) { CheckAct(uid, component, args); }
private void OnPickupAttempt(EntityUid uid, PAIComponent component, PickupAttemptEvent args) { args.Cancel(); }