private void OnRiderGetStateAttempt(EntityUid uid, RiderComponent component, ref ComponentGetStateAttemptEvent args) { if (uid != args.Player.AttachedEntity) { args.Cancelled = true; } }
private void OnGetStateAttempt(EntityUid uid, PilotComponent component, ref ComponentGetStateAttemptEvent args) { if (args.Cancelled || !TryComp <ActorComponent>(uid, out var actor) || actor.PlayerSession != args.Player) { args.Cancelled = true; } }
private void OnCanGetState(EntityUid uid, ActionsComponent component, ref ComponentGetStateAttemptEvent args) { // Only send action state data to the relevant player. if (args.Player.AttachedEntity != uid) { args.Cancelled = true; } }
private void OnGetStateAttempt(EntityUid uid, SharedFlashableComponent component, ComponentGetStateAttemptEvent args) { // Only send state to the player attached to the entity. if (args.Player.AttachedEntity != uid) { args.Cancel(); } }