public bool Condition(IEntity user, EntityCoordinates location, Direction direction)
        {
            foreach (var entity in location.GetEntitiesInTile(true))
            {
                if (entity.HasComponent <SharedWindowComponent>())
                {
                    return(false);
                }
            }

            return(true);
        }
        public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
        {
            foreach (var entity in location.GetEntitiesInTile(LookupFlags.Approximate | LookupFlags.IncludeAnchored))
            {
                if (IoCManager.Resolve <IEntityManager>().HasComponent <SharedWindowComponent>(entity))
                {
                    return(false);
                }
            }

            return(true);
        }
예제 #3
0
        public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
        {
            var tagSystem = EntitySystem.Get <TagSystem>();

            foreach (var entity in location.GetEntitiesInTile(LookupFlags.Approximate | LookupFlags.IncludeAnchored))
            {
                if (tagSystem.HasTag(entity, "Window"))
                {
                    return(false);
                }
            }

            return(true);
        }
예제 #4
0
        public bool Condition(IEntity user, EntityCoordinates location, Direction direction)
        {
            var lowWall = false;

            foreach (var entity in location.GetEntitiesInTile(true))
            {
                if (entity.HasComponent <SharedCanBuildWindowOnTopComponent>())
                {
                    lowWall = true;
                }

                // Already has a window.
                if (entity.HasComponent <SharedWindowComponent>())
                {
                    return(false);
                }
            }

            return(lowWall);
        }