GetFatBlocks() public method

public GetFatBlocks ( ) : List
return List
Ejemplo n.º 1
0
 public static bool DoesGroupHavePowerSupply(GridGroup group )
 {
     return group.GetFatBlocks().Any( DoesBlockSupplyPower );
 }
Ejemplo n.º 2
0
 public static bool IsGroupFunctional( GridGroup group )
 {
     foreach ( MyCubeBlock fatBlock in group.GetFatBlocks() )
     {
         MyFunctionalBlock block = fatBlock as MyFunctionalBlock;
         if ( block == null )
             continue;
         if ( block.IsFunctional )
             return true;
     }
     return false;
 }
Ejemplo n.º 3
0
        public static bool DoesGroupHaveBlockType(GridGroup group, string type, int count)
        {
            int result = 0;

            foreach (MyCubeBlock block in group.GetFatBlocks())
            {
                if (block.BlockDefinition.Id.TypeId.ToString(  ).ToLower().Contains( type, StringComparison.CurrentCultureIgnoreCase ))
                    result++;

                if (result >= count)
                    return true;
            }
            return false;
        }