public override Filter FromEntities(Filter filter, params EntityUid[] entities) { foreach (var uid in entities) { if (EntityManager.TryGetComponent(uid, out ActorComponent? actor)) { filter.AddPlayer(actor.PlayerSession); } } return(filter); }
public override Filter FromEntities(Filter filter, params EntityUid[] entities) { if (_playerManager.LocalPlayer is not { } localPlayer || localPlayer.Session.AttachedEntityUid is not { } attachedUid) { return(filter); } foreach (var uid in entities) { if (uid == attachedUid) { filter.AddPlayer(localPlayer.Session); } } return(filter); }