예제 #1
0
        public static bool CheckLimits_future(MyObjectBuilder_CubeGrid[] grids, long id = 0)
        {
            if (grids.Length == 0 || !BlockLimiterConfig.Instance.EnableLimits || Utilities.IsExcepted(id, new List <string>()))
            {
                return(false);
            }


            return(!grids.Any(Grid.IsSizeViolation) && grids.Any(x => !Grid.CanSpawn(x, id)));
        }
예제 #2
0
        public static bool CheckLimits_future(MyObjectBuilder_CubeGrid[] grids, long id = 0)
        {
            if (grids.Length == 0 || !BlockLimiterConfig.Instance.EnableLimits || Utilities.IsExcepted(id))
            {
                return(false);
            }

            foreach (var grid in grids)
            {
                if (Grid.CanSpawn(grid, id))
                {
                    continue;
                }
                return(true);
            }

            return(false);
        }