コード例 #1
0
ファイル: BlockLimiter.cs プロジェクト: RykerRus/BlockLimiter
        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);
        }