Show / Hide Table of Contents

Interface IMyGridTerminalSystem

Describes grid terminal system interface

Inherited Members
IMyGridTerminalSystem.GetBlocks(List<IMyTerminalBlock>)
IMyGridTerminalSystem.GetBlockGroups(List<IMyBlockGroup>, Func<IMyBlockGroup, Boolean>)
IMyGridTerminalSystem.GetBlocksOfType<T>(List<IMyTerminalBlock>, Func<IMyTerminalBlock, Boolean>)
IMyGridTerminalSystem.GetBlocksOfType<T>(List<T>, Func<T, Boolean>)
IMyGridTerminalSystem.SearchBlocksOfName(String, List<IMyTerminalBlock>, Func<IMyTerminalBlock, Boolean>)
IMyGridTerminalSystem.GetBlockWithId(Int64)
IMyGridTerminalSystem.CanAccess(IMyTerminalBlock, MyTerminalAccessScope)
IMyGridTerminalSystem.CanAccess(IMyCubeGrid, MyTerminalAccessScope)
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyGridTerminalSystem : IMyGridTerminalSystem

Methods

GetBlockGroups(List<IMyBlockGroup>)

Fills the provided list with the block groups reachable by this grid terminal system.

Declaration
void GetBlockGroups(List<IMyBlockGroup> blockGroups)
Parameters
Type Name Description
System.Collections.Generic.List<IMyBlockGroup> blockGroups

GetBlockGroupWithName(String)

Returns the first block group found with the given name. Will return null if no block group with that name can be found.

Declaration
IMyBlockGroup GetBlockGroupWithName(string name)
Parameters
Type Name Description
System.String name

The block group must contain the given name in their name.

Returns
Type Description
IMyBlockGroup

First found block group with name or null if no block group with that name can be found

GetBlocks(List<IMyTerminalBlock>)

Fills the provided list with all the blocks reachable by this grid terminal system. This means all blocks on the same grid, or connected via rotors, pistons or connectors.

Declaration
void GetBlocks(List<IMyTerminalBlock> blocks)
Parameters
Type Name Description
System.Collections.Generic.List<IMyTerminalBlock> blocks

A preallocated list to receive the blocks.

GetBlocksOfType<T>(List<IMyTerminalBlock>, Func<IMyTerminalBlock, Boolean>)

Fills the provided list with the blocks reachable by this grid terminal system. This means all blocks on the same grid, or connected via rotors, pistons or connectors.

Declaration
void GetBlocksOfType<T>(List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null)
Parameters
Type Name Description
System.Collections.Generic.List<IMyTerminalBlock> blocks

A preallocated list to receive the blocks.

System.Func<IMyTerminalBlock, System.Boolean> collect

Provide a filter method to determine if a given group should be added or not.

Type Parameters
Name Description
T

The type of blocks to retrieve.

GetBlockWithName(String)

Returns the first block found with the given name.

Declaration
IMyTerminalBlock GetBlockWithName(string name)
Parameters
Type Name Description
System.String name

The block must contain the given name in their name.

Returns
Type Description
IMyTerminalBlock

First found block with name or null if no block with that name can be found

SearchBlocksOfName(String, List<IMyTerminalBlock>, Func<IMyTerminalBlock, Boolean>)

Fills the provided list with the blocks reachable by this grid terminal system. This means all blocks on the same grid, or connected via rotors, pistons or connectors.

Declaration
void SearchBlocksOfName(string name, List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null)
Parameters
Type Name Description
System.String name

The blocks must contain the given name in their name.

System.Collections.Generic.List<IMyTerminalBlock> blocks

A preallocated list to receive the blocks.

System.Func<IMyTerminalBlock, System.Boolean> collect

Provide a filter method to determine if a given group should be added or not.

Events

GroupAdded

Called when new block group was added. Warning, on grid disconnects, you would need to unsubscribe and subscribe to new TerminalSystem

Declaration
event Action<IMyBlockGroup> GroupAdded
Event Type
Type Description
System.Action<IMyBlockGroup>

GroupRemoved

Called when new block group was removed. Warning, on grid disconnects, you would need to unsubscribe and subscribe to new TerminalSystem

Declaration
event Action<IMyBlockGroup> GroupRemoved
Event Type
Type Description
System.Action<IMyBlockGroup>
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾