Programmable Block

From Space Engineers Wiki
Revision as of 03:56, 2 January 2015 by Vilsol (talk | contribs) (Add some of the API)
Jump to: navigation, search


Programmable Block Icon.png
Large Ship Icon.png
Large Ship / Station
Programmable Block
 
Components
Required

 

 
 
1
 
 
Mass (kg):
0
 
Integrity:
0
 
Build time (seconds):
Unknown
Programmable Block Icon.png
Small Ship Icon.png
Small Ship
Programmable Block
 
Components
Required

 

 
 
1
 
 
Mass (kg):
0
 
Integrity:
0
 
Build time (seconds):
Unknown

A Programmable Block can be programmed to do different functions, like switching lights and controlling doors. It can also be used by entering the control panel in the Terminal. It has almost unlimited functionality. One of the biggest problems is that variables are not saved between world exit and loading.

API List

This is a list of all API functions currently available[1].

GridTerminalSystem

Currently only following “built-in” variable that user can use: GridTerminalSystem. This is entry point of entire grid terminal system.

Method/Property Return Type Description
Blocks List<IMyTerminalBlock> Returns a list of all blocks on the grid
BlockGroups List<IMyBlockGroup> Returns a list of all groups in the grid.
GetBlocksOfType<T>(List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null) void Puts all found blocks of provided type in the list that are connected to the grid
SearchBlocksOfName(string name,List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null) void Puts all found blocks of provided name in the list that are connected to the grid
GetBlockWithName(string name) IMyTerminalBlock Returns a block with provided name

IMyCubeBlock

IMyCubeBlock is base class for every terminal block.

Method/Property Return Type Description
IsBeingHacked boolean Returns true if block is being hacked
IsFunctional boolean Returns true if current block is operational
IsWorking boolean Returns true if current block is powered
Position VRageMath.Vector3I Returns current position


  1. http://steamcommunity.com/sharedfiles/filedetails/?id=360966557