namespace Content.Shared.Random.Rules; /// /// Returns true if the attached entity is in space. /// public sealed partial class InSpaceRule : RulesRule { public override bool Check(EntityManager entManager, EntityUid uid) { if (!entManager.TryGetComponent(uid, out TransformComponent? xform) || xform.GridUid != null) { return Inverted; } return !Inverted; } }