Show / Hide Table of Contents

Class TerminalBlockExtentions

Class having some sugar extensions. Written by Kalvin Osborne, AKA Night Lone.

Inheritance
System.Object
TerminalBlockExtentions
Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Syntax
public static class TerminalBlockExtentions : Object

Methods

ApplyAction(IMyTerminalBlock, String)

Finds action by GetActionWithName(String) and calls Apply(IMyCubeBlock)

Declaration
public static void ApplyAction(this IMyTerminalBlock block, string actionName)
Parameters
Type Name Description
IMyTerminalBlock block

To apply action on

System.String actionName

Name of action

Exceptions
Type Condition
System.NullReferenceException

If action not found

ApplyAction(IMyTerminalBlock, String, List<TerminalActionParameter>)

Finds action by GetActionWithName(String) and calls Apply(IMyCubeBlock, ListReader<TerminalActionParameter>)

Declaration
public static void ApplyAction(this IMyTerminalBlock block, string actionName, List<TerminalActionParameter> parameters)
Parameters
Type Name Description
IMyTerminalBlock block

To apply action on

System.String actionName

Name of action

System.Collections.Generic.List<TerminalActionParameter> parameters

Parameters for terminal action function call

Exceptions
Type Condition
System.NullReferenceException

If action not found

GetId(IMyTerminalBlock)

Get EntityId of block

Declaration
public static long GetId(this IMyTerminalBlock block)
Parameters
Type Name Description
IMyTerminalBlock block

Target block

Returns
Type Description
System.Int64

EntityId

GetInventory(IMyTerminalBlock, Int32)

Obsolete

Declaration
public static IMyInventory GetInventory(this IMyTerminalBlock block, int index)
Parameters
Type Name Description
IMyTerminalBlock block

obsolete

System.Int32 index

obsolete

Returns
Type Description
IMyInventory

GetInventoryCount(IMyTerminalBlock)

Obsolete

Declaration
public static int GetInventoryCount(this IMyTerminalBlock block)
Parameters
Type Name Description
IMyTerminalBlock block

Obsolete

Returns
Type Description
System.Int32

GetUseConveyorSystem(IMyTerminalBlock)

Obsolete

Declaration
public static bool GetUseConveyorSystem(this IMyTerminalBlock block)
Parameters
Type Name Description
IMyTerminalBlock block

Obsolete

Returns
Type Description
System.Boolean

HasAction(IMyTerminalBlock, String)

Searches for terminal action with name

Declaration
public static bool HasAction(this IMyTerminalBlock block, string actionName)
Parameters
Type Name Description
IMyTerminalBlock block

Terminal block which should have action

System.String actionName

Name of action

Returns
Type Description
System.Boolean

True if terminal action found

HasInventory(IMyTerminalBlock)

Obsolete

Declaration
public static bool HasInventory(this IMyTerminalBlock block)
Parameters
Type Name Description
IMyTerminalBlock block

Obsolete

Returns
Type Description
System.Boolean

SetUseConveyorSystem(IMyTerminalBlock, Boolean)

Obsolete

Declaration
public static void SetUseConveyorSystem(this IMyTerminalBlock block, bool use)
Parameters
Type Name Description
IMyTerminalBlock block

Obsolete

System.Boolean use

Obsolete

☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾