API Reference
IBlockDictionary
An IBlockDictionary represents a collection of blocks.
IBlockDictionary.Contains(BlockReference)
Checks if the dictionary contains any blocks of the specified type.
bool contains = dictionary.Contains(BlockReferences.Thruster);
IBlockDictionary.Contains(BlockReference, string subtype)
Checks if the dictionary contains any blocks of the specified type and subtype.
bool contains = dictionary.Contains(BlockReferences.Thruster, "LargeAtmospheric");
IBlockDictionary.Count(BlockReference)
Counts the number of blocks of the specified type in the dictionary.
int count = dictionary.Count(BlockReferences.Thruster);
IBlockDictionary.Count(BlockReference, string subtype)
Counts the number of blocks of the specified type and subtype in the dictionary.
int count = dictionary.Count(BlockReferences.Thruster, "LargeAtmospheric");
IBlockDictionary.Get(BlockReference)
Gets a block from the group by its BlockReference.
IEnumerable<MyThrust> thrusters = data.Get(BlockReferences.Thruster);
Returns an IEnumerable of the appropriate MyCubeBlock type.
IBlockDictionary.Get(BlockReference, string subtype)
Gets a block from the group by its BlockReference and subtype.
IEnumerable<MyThrust> thrusters = data.Get(BlockReferences.Thruster, "LargeAtmospheric");
Returns an IEnumerable of the appropriate MyCubeBlock type filtered by the subtype.