Difference between revisions of "Programming Guide"

From Space Engineers Wiki
Jump to: navigation, search
(Added info from http://steamcommunity.com/sharedfiles/filedetails/?id=360966557 to match the /In-game_coding/ru page. Still needs formatting applied to rest of article.)
 
(Details (workshop script): Line breaks. Lots and lots of line breaks.)
Line 134: Line 134:
  
 
GridTerminalSystem variable
 
GridTerminalSystem variable
Currently only following “built-in” variable that user can use: GridTerminalSystem. This is entry point of entire grid terminal system.
+
Currently only following “built-in” variable that user can use: GridTerminalSystem. This is entry point of entire grid terminal system.<br />
It has following methods available:
+
It has following methods available:<br />
List<IMyTerminalBlock> Blocks{get;}
+
List<IMyTerminalBlock> Blocks{get;}<br />
List<IMyBlockGroup> BlockGroups { get; }
+
List<IMyBlockGroup> BlockGroups { get; }<br />
void GetBlocksOfType<T>(List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null);
+
void GetBlocksOfType<T>(List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null);<br />
void SearchBlocksOfName(string name,List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null);
+
void SearchBlocksOfName(string name,List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null);<br />
IMyTerminalBlock GetBlockWithName(string name);
+
IMyTerminalBlock GetBlockWithName(string name);<br />
 
With these methods all terminal blocks of grid can be collected.
 
With these methods all terminal blocks of grid can be collected.
  
Blocks property will get all block of grid terminal, this method internally allocates new memory.  
+
Blocks property will get all block of grid terminal, this method internally allocates new memory. <br />
BlockGroups will get all groups of grid terminal, this method internally allocates new memory
+
BlockGroups will get all groups of grid terminal, this method internally allocates new memory<br />
GetBlocksOfType will get all blocks of given type.
+
GetBlocksOfType will get all blocks of given type.<br />
SearchBlocksOfName method will fulltext search between all blocks and returns block that contains searched string , search is case insensitive.
+
SearchBlocksOfName method will fulltext search between all blocks and returns block that contains searched string , search is case insensitive.<br />
GetBlockWithName method will get first block with exact name as provided , search is case sensitive.
+
GetBlockWithName method will get first block with exact name as provided , search is case sensitive.<br />
  
 
Func<IMyTerminalBlock, bool> collect method can be used for defining search condition within search. E.g. Collect method for IMyRadioAntenna can define search function to search only for turned on antennas or antennas with specific range.
 
Func<IMyTerminalBlock, bool> collect method can be used for defining search condition within search. E.g. Collect method for IMyRadioAntenna can define search function to search only for turned on antennas or antennas with specific range.
  
IMyCubeBlock
+
IMyCubeBlock<br />
IMyCubeBlock is base class for every terminal block. It has following Properties and methods:
+
IMyCubeBlock is base class for every terminal block. It has following Properties and methods:<br />
bool IsBeingHacked { get; }
+
bool IsBeingHacked { get; }<br />
bool IsFunctional { get; }
+
bool IsFunctional { get; }<br />
bool IsWorking { get; }
+
bool IsWorking { get; }<br />
VRageMath.Vector3I Position { get; }
+
VRageMath.Vector3I Position { get; }<br />
  
IsFunctional property tells if current block is constructed to the level it can operate
+
IsFunctional property tells if current block is constructed to the level it can operate<br />
IsWorking property tells if current block is powered
+
IsWorking property tells if current block is powered<br />
 
 
IMyTerminalBlock
+
IMyTerminalBlock<br />
IMyTerminalBlock is base class for every terminal block, all of the block will have following properties and methods:
+
IMyTerminalBlock is base class for every terminal block, all of the block will have following properties and methods:<br />
  
string CustomName  
+
string CustomName <br />
string CustomNameWithFaction  
+
string CustomNameWithFaction <br />
string DetailedInfo  
+
string DetailedInfo <br />
bool HasLocalPlayerAccess()
+
bool HasLocalPlayerAccess()<br />
bool HasPlayerAccess(long playerId)
+
bool HasPlayerAccess(long playerId)<br />
void RequestShowOnHUD(bool enable)
+
void RequestShowOnHUD(bool enable)<br />
void SetCustomName(string text)
+
void SetCustomName(string text)<br />
void SetCustomName(StringBuilder text)
+
void SetCustomName(StringBuilder text)<br />
bool ShowOnHUD  
+
bool ShowOnHUD <br />
void GetActions(List<Sandbox.ModAPI.Interfaces.ITerminalAction> resultList, Func<Sandbox.ModAPI.Interfaces.ITerminalAction, bool> collect = null);
+
void GetActions(List<Sandbox.ModAPI.Interfaces.ITerminalAction> resultList, Func<Sandbox.ModAPI.Interfaces.ITerminalAction, bool> collect = null);<br />
void SearchActionsOfName(string name,List<Sandbox.ModAPI.Interfaces.ITerminalAction> resultList, Func<Sandbox.ModAPI.Interfaces.ITerminalAction, bool> collect = null);
+
void SearchActionsOfName(string name,List<Sandbox.ModAPI.Interfaces.ITerminalAction> resultList, Func<Sandbox.ModAPI.Interfaces.ITerminalAction, bool> collect = null);<br />
 
Sandbox.ModAPI.Interfaces.ITerminalAction GetActionWithName(string name);
 
Sandbox.ModAPI.Interfaces.ITerminalAction GetActionWithName(string name);
  
GetActions method will get all action available for current block.  
+
GetActions method will get all action available for current block. <br />
 
SearchActionsOfName method will fulltext search between all blocks actions and returns actions that contains searched string e.g. if block has actions : OnOff ,OnOff_On ,OnOff_Off  
 
SearchActionsOfName method will fulltext search between all blocks actions and returns actions that contains searched string e.g. if block has actions : OnOff ,OnOff_On ,OnOff_Off  
  
Line 184: Line 184:
 
GetActionWithName method will get first action with exact name as provided , search is case sensitive.
 
GetActionWithName method will get first action with exact name as provided , search is case sensitive.
  
ITerminalAction
+
ITerminalAction<br />
ITerminal action is representation of concrete action that can be triggered. It has following properties and methods:
+
ITerminal action is representation of concrete action that can be triggered. It has following properties and methods:<br />
string Id { get; }
+
string Id { get; }<br />
StringBuilder Name { get; }
+
StringBuilder Name { get; }<br />
void Apply(Sandbox.ModAPI.Ingame.IMyCubeBlock block);
+
void Apply(Sandbox.ModAPI.Ingame.IMyCubeBlock block);<br />
  
Id is Id of action e.g. OnOff, OnOff_On
+
Id is Id of action e.g. OnOff, OnOff_On<br />
Name is name of the action shown in UI e.g. Toggle block On/Off ,Toggle block On
+
Name is name of the action shown in UI e.g. Toggle block On/Off ,Toggle block On<br />
Apply will apply action for given block (you need to provide block from which you took actions)
+
Apply will apply action for given block (you need to provide block from which you took actions)<br />
  
IMyFunctionalBlock
+
IMyFunctionalBlock<br />
IMyFunctionalBlock is base class for every block that can be turned on or off, it’s derived from IMyTerminal block e.g. every Functional block is Terminal block but not all terminal blocks can be turned on or off.
+
IMyFunctionalBlock is base class for every block that can be turned on or off, it’s derived from IMyTerminal block e.g. every Functional block is Terminal block but not all terminal blocks can be turned on or off.<br />
It has one Property:
+
It has one Property:<br />
bool Enabled  
+
bool Enabled <br />
This property indicates if block is turned on or off by user.
+
This property indicates if block is turned on or off by user.<br />
Terminal block and action name list - 1/3
+
Terminal block and action name list - 1/3<br />
Disclaimer
+
Disclaimer<br />
All terminal blocks have the following properties:
+
All terminal blocks have the following properties:<br />
 
Interface name: this name is the name of the block in code, it can differ from the name as displayed in the building screen. E.g. Antenna interface name is IMyRadioAntenna - you need to use this interface if you want to get all antennas.
 
Interface name: this name is the name of the block in code, it can differ from the name as displayed in the building screen. E.g. Antenna interface name is IMyRadioAntenna - you need to use this interface if you want to get all antennas.
  
Line 210: Line 210:
 
Actions: these are all available actions for block with their names in game, so if you want to increase broadcast radius for antenna, you need to execute DecreaseRadius action for block.
 
Actions: these are all available actions for block with their names in game, so if you want to increase broadcast radius for antenna, you need to execute DecreaseRadius action for block.
  
Same block class for different SubTypeID
+
Same block class for different SubTypeID<br />
Some blocks have same parent (e.g. <TypeId> in cubeblocks.sbc) and differs only by subtype (e.g. <SubtypeId>). This means there is no distinction between these block in code.  
+
Some blocks have same parent (e.g. <TypeId> in cubeblocks.sbc) and differs only by subtype (e.g. <SubtypeId>). This means there is no distinction between these block in code. <br />
Example of these blocks is the Cargo Container: there are 3 types of cargo containers in the game: small, medium and large. These three types differ only by subtype and Type is same for them e.g. large cargo container id is:  
+
Example of these blocks is the Cargo Container: there are 3 types of cargo containers in the game: small, medium and large. These three types differ only by subtype and Type is same for them e.g. large cargo container id is: <br />
<Id>
+
<Id><br />
<TypeId>CargoContainer</TypeId>
+
<TypeId>CargoContainer</TypeId><br />
<SubtypeId>LargeBlockLargeContainer</SubtypeId>
+
<SubtypeId>LargeBlockLargeContainer</SubtypeId><br />
</Id>
+
</Id><br />
Medium is:
+
Medium is:<br />
<Id>
+
<Id><br />
<TypeId>CargoContainer</TypeId>
+
<TypeId>CargoContainer</TypeId><br />
<SubtypeId>SmallBlockMediumContainer</SubtypeId>
+
<SubtypeId>SmallBlockMediumContainer</SubtypeId><br />
</Id>
+
</Id><br />
And small is:
+
And small is:<br />
<Id>
+
<Id><br />
<TypeId>CargoContainer</TypeId>
+
<TypeId>CargoContainer</TypeId><br />
<SubtypeId>LargeBlockSmallContainer</SubtypeId>
+
<SubtypeId>LargeBlockSmallContainer</SubtypeId><br />
</Id>
+
</Id><br />
  
 
In this case there is only one class IMyCargoContainer for all types of cargo containers.
 
In this case there is only one class IMyCargoContainer for all types of cargo containers.
  
Antenna
+
Antenna<br />
Interface name: IMyRadioAntenna
+
Interface name: IMyRadioAntenna<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: float Radius
+
Fields: float Radius<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseRadius -> Increase Broadcast radius
+
IncreaseRadius -> Increase Broadcast radius<br />
DecreaseRadius -> Decrease Broadcast radius
+
DecreaseRadius -> Decrease Broadcast radius<br />
  
Arc furnace
+
Arc furnace<br />
Interface name: IMyRefinery
+
Interface name: IMyRefinery<br />
Parent: IMyProductionBlock
+
Parent: IMyProductionBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Artificial Mass
+
Artificial Mass<br />
Interface name: IMyVirtualMass
+
Interface name: IMyVirtualMass<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: None
+
Fields: None<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
  
Assembler
+
Assembler<br />
Interface name: IMyAssembler
+
Interface name: IMyAssembler<br />
Parent: IMyProductionBlock
+
Parent: IMyProductionBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Battery
+
Battery<br />
Interface name: IMyBatteryBlock
+
Interface name: IMyBatteryBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool HasCapacityRemaining
+
Fields: bool HasCapacityRemaining<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Recharge -> Recharge On/Off
+
Recharge -> Recharge On/Off<br />
  
Beacon
+
Beacon<br />
Interface name: IMyBeacon
+
Interface name: IMyBeacon<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: float Radius  
+
Fields: float Radius <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseRadius -> Increase Broadcast radius
+
IncreaseRadius -> Increase Broadcast radius<br />
DecreaseRadius -> Decrease Broadcast radius
+
DecreaseRadius -> Decrease Broadcast radius<br />
  
Button Panel
+
Button Panel<br />
Interface name: IMyButtonPanel
+
Interface name: IMyButtonPanel<br />
Fields: bool AnyoneCanUse
+
Fields: bool AnyoneCanUse<br />
Actions:
+
Actions:<br />
AnyoneCanUse -> Anyone Can Use On/Off
+
AnyoneCanUse -> Anyone Can Use On/Off<br />
  
Camera
+
Camera<br />
Interface name: IMyCameraBlock
+
Interface name: IMyCameraBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: None
+
Fields: None<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
View -> View
+
View -> View<br />
  
Cockpit
+
Cockpit<br />
Interface name: IMyCockpit
+
Interface name: IMyCockpit<br />
Parent: IMyShipController
+
Parent: IMyShipController<br />
Fields:
+
Fields:<br />
bool ControlWheels
+
bool ControlWheels<br />
bool ControlThrusters
+
bool ControlThrusters<br />
bool HandBrake  
+
bool HandBrake <br />
bool DampenersOverride
+
bool DampenersOverride<br />
Actions:
+
Actions:<br />
ControlThrusters -> Control thrusters On/Off
+
ControlThrusters -> Control thrusters On/Off<br />
ControlWheels -> Control wheels On/Off
+
ControlWheels -> Control wheels On/Off<br />
HandBrake -> Handbrake On/Off
+
HandBrake -> Handbrake On/Off<br />
 
DampenersOverride -> Inertia dampeners On/Off
 
DampenersOverride -> Inertia dampeners On/Off
  
Collector
+
Collector<br />
Interface name: IMyCollector
+
Interface name: IMyCollector<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Connector
+
Connector<br />
Interface name: IMyShipConnector
+
Interface name: IMyShipConnector<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool ThrowOut  
+
bool ThrowOut <br />
bool CollectAll  
+
bool CollectAll <br />
bool IsLocked  
+
bool IsLocked <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
ThrowOut -> Throw Out On/Off
+
ThrowOut -> Throw Out On/Off<br />
CollectAll -> Collect All On/Off
+
CollectAll -> Collect All On/Off<br />
SwitchLock -> Switch lock
+
SwitchLock -> Switch lock<br />
  
Control Panel
+
Control Panel<br />
Interface name: IMyControlPanel
+
Interface name: IMyControlPanel<br />
Fields: None
+
Fields: None<br />
Actions: None
+
Actions: None<br />
  
Control Station
+
Control Station<br />
Interface name: IMyCockpit
+
Interface name: IMyCockpit<br />
Parent: IMyShipController
+
Parent: IMyShipController<br />
Fields:
+
Fields:<br />
bool ControlWheels
+
bool ControlWheels<br />
bool ControlThrusters
+
bool ControlThrusters<br />
bool HandBrake  
+
bool HandBrake <br />
bool DampenersOverride
+
bool DampenersOverride<br />
Actions:
+
Actions:<br />
ControlThrusters -> Control thrusters On/Off
+
ControlThrusters -> Control thrusters On/Off<br />
ControlWheels -> Control wheels On/Off
+
ControlWheels -> Control wheels On/Off<br />
HandBrake -> Handbrake On/Off
+
HandBrake -> Handbrake On/Off<br />
DampenersOverride -> Inertia dampeners On/Off
+
DampenersOverride -> Inertia dampeners On/Off<br />
  
Door
+
Door<br />
Interface name: IMyDoor
+
Interface name: IMyDoor<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool Open
+
Fields: bool Open<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Open -> Open/Closed
+
Open -> Open/Closed<br />
Open_On -> Open
+
Open_On -> Open<br />
Open_Off -> Closed
+
Open_Off -> Closed<br />
  
Drill
+
Drill<br />
Interface name: IMyShipDrill
+
Interface name: IMyShipDrill<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Flight Seat
+
Flight Seat<br />
Interface name: IMyCockpit
+
Interface name: IMyCockpit<br />
Parent: IMyShipController
+
Parent: IMyShipController<br />
Fields:
+
Fields:<br />
bool ControlWheels
+
bool ControlWheels<br />
bool ControlThrusters
+
bool ControlThrusters<br />
bool HandBrake  
+
bool HandBrake <br />
bool DampenersOverride
+
bool DampenersOverride<br />
Actions:
+
Actions:<br />
ControlThrusters -> Control thrusters On/Off
+
ControlThrusters -> Control thrusters On/Off<br />
ControlWheels -> Control wheels On/Off
+
ControlWheels -> Control wheels On/Off<br />
HandBrake -> Handbrake On/Off
+
HandBrake -> Handbrake On/Off<br />
 
DampenersOverride -> Inertia dampeners On/Off
 
DampenersOverride -> Inertia dampeners On/Off
  
Gatling Turret
+
Gatling Turret<br />
Interface name: IMyLargeGatlingTurret
+
Interface name: IMyLargeGatlingTurret<br />
Parent: IMyLargeConveyorTurretBase
+
Parent: IMyLargeConveyorTurretBase<br />
Parent: IMyLargeTurretBase
+
Parent: IMyLargeTurretBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool UseConveyorSystem  
+
bool UseConveyorSystem <br />
bool CanControl
+
bool CanControl<br />
float Range
+
float Range<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Control -> Control
+
Control -> Control<br />
IncreaseRange -> Increase Radius
+
IncreaseRange -> Increase Radius<br />
DecreaseRange -> Decrease Radius
+
DecreaseRange -> Decrease Radius<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Gravity Generator
+
Gravity Generator<br />
Interface name: IMyGravityGenerator
+
Interface name: IMyGravityGenerator<br />
Parent: IMyGravityGeneratorBase
+
Parent: IMyGravityGeneratorBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float FieldWidth  
+
float FieldWidth <br />
float FieldHeight  
+
float FieldHeight <br />
float FieldDepth  
+
float FieldDepth <br />
float Gravity  
+
float Gravity <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseWidth -> Increase Field width
+
IncreaseWidth -> Increase Field width<br />
DecreaseWidth -> Decrease Field width
+
DecreaseWidth -> Decrease Field width<br />
IncreaseHeight -> Increase Field height
+
IncreaseHeight -> Increase Field height<br />
DecreaseHeight -> Decrease Field height
+
DecreaseHeight -> Decrease Field height<br />
IncreaseDepth -> Increase Field depth
+
IncreaseDepth -> Increase Field depth<br />
DecreaseDepth -> Decrease Field depth
+
DecreaseDepth -> Decrease Field depth<br />
IncreaseGravity -> Increase Acceleration
+
IncreaseGravity -> Increase Acceleration<br />
DecreaseGravity -> Decrease Acceleration
+
DecreaseGravity -> Decrease Acceleration<br />
  
Grinder
+
Grinder<br />
Interface name: IMyShipGrinder
+
Interface name: IMyShipGrinder<br />
Parent: IMyShipToolBase
+
Parent: IMyShipToolBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: None
+
Fields: None<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Gyroscope
+
Gyroscope<br />
Interface name: IMyGyro
+
Interface name: IMyGyro<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float GyroPower  
+
float GyroPower <br />
bool GyroOverride  
+
bool GyroOverride <br />
float Yaw  
+
float Yaw <br />
float Pitch  
+
float Pitch <br />
float Roll  
+
float Roll <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreasePower -> Increase Power
+
IncreasePower -> Increase Power<br />
DecreasePower -> Decrease Power
+
DecreasePower -> Decrease Power<br />
Override -> Override controls On/Off
+
Override -> Override controls On/Off<br />
IncreaseYaw -> Increase Yaw override
+
IncreaseYaw -> Increase Yaw override<br />
DecreaseYaw -> Decrease Yaw override
+
DecreaseYaw -> Decrease Yaw override<br />
IncreasePitch -> Increase Pitch override
+
IncreasePitch -> Increase Pitch override<br />
DecreasePitch -> Decrease Pitch override
+
DecreasePitch -> Decrease Pitch override<br />
IncreaseRoll -> Increase Roll override
+
IncreaseRoll -> Increase Roll override<br />
DecreaseRoll -> Decrease Roll override
+
DecreaseRoll -> Decrease Roll override<br />
Terminal block and action name list - 2/3
+
Terminal block and action name list - 2/3<br />
Interior Light
+
Interior Light<br />
Interface name: IMyInteriorLight
+
Interface name: IMyInteriorLight<br />
Parent: IMyLightingBlock
+
Parent: IMyLightingBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float Radius
+
float Radius<br />
float Intensity
+
float Intensity<br />
float BlinkIntervalSeconds
+
float BlinkIntervalSeconds<br />
float BlinkLenght
+
float BlinkLenght<br />
float BlinkOffset
+
float BlinkOffset<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseRadius -> Increase Radius
+
IncreaseRadius -> Increase Radius<br />
DecreaseRadius -> Decrease Radius
+
DecreaseRadius -> Decrease Radius<br />
IncreaseBlink Interval -> Increase Blink Interval
+
IncreaseBlink Interval -> Increase Blink Interval<br />
DecreaseBlink Interval -> Decrease Blink Interval
+
DecreaseBlink Interval -> Decrease Blink Interval<br />
IncreaseBlink Lenght -> Increase Blink Length
+
IncreaseBlink Lenght -> Increase Blink Length<br />
DecreaseBlink Lenght -> Decrease Blink Length
+
DecreaseBlink Lenght -> Decrease Blink Length<br />
IncreaseBlink Offset -> Increase Blink Offset
+
IncreaseBlink Offset -> Increase Blink Offset<br />
DecreaseBlink Offset -> Decrease Blink Offset
+
DecreaseBlink Offset -> Decrease Blink Offset<br />
  
Interior Turret
+
Interior Turret<br />
Interface name: IMyLargeInteriorTurret
+
Interface name: IMyLargeInteriorTurret<br />
Parent: IMyLargeTurretBase
+
Parent: IMyLargeTurretBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool CanControl
+
bool CanControl<br />
float Range
+
float Range<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Control -> Control
+
Control -> Control<br />
IncreaseRange -> Increase Radius
+
IncreaseRange -> Increase Radius<br />
DecreaseRange -> Decrease Radius
+
DecreaseRange -> Decrease Radius<br />
  
Landing Gear
+
Landing Gear<br />
Interface name: IMyLandingGear
+
Interface name: IMyLandingGear<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float BreakForce
+
float BreakForce<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Lock -> Lock
+
Lock -> Lock<br />
Unlock -> Unlock
+
Unlock -> Unlock<br />
SwitchLock -> Switch lock
+
SwitchLock -> Switch lock<br />
Autolock -> Autolock On/Off
+
Autolock -> Autolock On/Off<br />
IncreaseBreakForce -> Increase Break Force
+
IncreaseBreakForce -> Increase Break Force<br />
DecreaseBreakForce -> Decrease Break Force
+
DecreaseBreakForce -> Decrease Break Force<br />
  
Small Cargo Container
+
Small Cargo Container<br />
Interface name: IMyCargoContainer
+
Interface name: IMyCargoContainer<br />
Fields: None
+
Fields: None<br />
Actions: None
+
Actions: None<br />
  
Medium Cargo Container
+
Medium Cargo Container<br />
Interface name: IMyCargoContainer
+
Interface name: IMyCargoContainer<br />
Fields: None
+
Fields: None<br />
Actions:None
+
Actions:None<br />
  
Large Cargo Container
+
Large Cargo Container<br />
Interface name: IMyCargoContainer
+
Interface name: IMyCargoContainer<br />
Fields: None
+
Fields: None<br />
Actions: None
+
Actions: None<br />
  
Small Reactor
+
Small Reactor<br />
Interface name: IMyReactor
+
Interface name: IMyReactor<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool UseConveyorSystem
+
bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Large Reactor
+
Large Reactor<br />
Interface name: IMyReactor
+
Interface name: IMyReactor<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Small Thruster
+
Small Thruster<br />
Interface name: IMyThrust
+
Interface name: IMyThrust<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: float ThrustOverride
+
Fields: float ThrustOverride<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseOverride -> Increase Thrust override
+
IncreaseOverride -> Increase Thrust override<br />
DecreaseOverride -> Decrease Thrust override
+
DecreaseOverride -> Decrease Thrust override<br />
  
Large Thruster
+
Large Thruster<br />
Interface name: IMyThrust
+
Interface name: IMyThrust<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: float ThrustOverride
+
Fields: float ThrustOverride<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseOverride -> Increase Thrust override
+
IncreaseOverride -> Increase Thrust override<br />
DecreaseOverride -> Decrease Thrust override
+
DecreaseOverride -> Decrease Thrust override<br />
  
Medical Room
+
Medical Room<br />
Interface name: IMyMedicalRoom
+
Interface name: IMyMedicalRoom<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: None
+
Fields: None<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
  
Merge Block
+
Merge Block<br />
Interface name: IMyShipMergeBlock
+
Interface name: IMyShipMergeBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: None
+
Fields: None<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
  
Missile Turret
+
Missile Turret<br />
Interface name: IMyLargeMissileTurret
+
Interface name: IMyLargeMissileTurret<br />
Parent: IMyLargeConveyorTurretBase
+
Parent: IMyLargeConveyorTurretBase<br />
Parent: IMyLargeTurretBase
+
Parent: IMyLargeTurretBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool UseConveyorSystem  
+
bool UseConveyorSystem <br />
bool CanControl
+
bool CanControl<br />
float Range
+
float Range<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Control -> Control
+
Control -> Control<br />
IncreaseRange -> Increase Radius
+
IncreaseRange -> Increase Radius<br />
DecreaseRange -> Decrease Radius
+
DecreaseRange -> Decrease Radius<br />
UseConveyor -> Use Conveyor System On/Of
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Ore Detector
+
Ore Detector<br />
Interace name: IMyOreDetector
+
Interace name: IMyOreDetector<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float Range  
+
float Range <br />
bool BroadcastUsingAntennas  
+
bool BroadcastUsingAntennas <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
  
Passenger Seat
+
Passenger Seat<br />
Interface name: IMyCockpit
+
Interface name: IMyCockpit<br />
Parent: IMyShipController
+
Parent: IMyShipController<br />
Fields:
+
Fields:<br />
bool ControlWheels
+
bool ControlWheels<br />
bool ControlThrusters
+
bool ControlThrusters<br />
bool HandBrake  
+
bool HandBrake <br />
bool DampenersOverride
+
bool DampenersOverride<br />
Actions:
+
Actions:<br />
ControlThrusters -> Control thrusters On/Off
+
ControlThrusters -> Control thrusters On/Off<br />
ControlWheels -> Control wheels On/Off
+
ControlWheels -> Control wheels On/Off<br />
HandBrake -> Handbrake On/Off
+
HandBrake -> Handbrake On/Off<br />
DampenersOverride -> Inertia dampeners On/Off
+
DampenersOverride -> Inertia dampeners On/Off<br />
  
Piston
+
Piston<br />
Interface name: IMyPistonBase
+
Interface name: IMyPistonBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float Velocity  
+
float Velocity <br />
float MinLimit  
+
float MinLimit <br />
float MaxLimit  
+
float MaxLimit <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Reverse -> Reverse
+
Reverse -> Reverse<br />
IncreaseVelocity -> Increase Velocity
+
IncreaseVelocity -> Increase Velocity<br />
DecreaseVelocity -> Decrease Velocity
+
DecreaseVelocity -> Decrease Velocity<br />
ResetVelocity -> Reset Velocity
+
ResetVelocity -> Reset Velocity<br />
IncreaseUpperLimit -> Increase Maximal distance
+
IncreaseUpperLimit -> Increase Maximal distance<br />
DecreaseUpperLimit -> Decrease Maximal distance
+
DecreaseUpperLimit -> Decrease Maximal distance<br />
IncreaseLowerLimit -> Increase Minimal distance
+
IncreaseLowerLimit -> Increase Minimal distance<br />
DecreaseLowerLimit -> Decrease Minimal distance
+
DecreaseLowerLimit -> Decrease Minimal distance<br />
  
Programmable block
+
Programmable block<br />
Interface name: IMyProgrammableBlock
+
Interface name: IMyProgrammableBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool IsRunning
+
Fields: bool IsRunning<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
 
Run -> Run
 
Run -> Run
Terminal block and action name list - 3/3
+
Terminal block and action name list - 3/3<br />
Refinery
+
Refinery<br />
Interface name: IMyRefinery
+
Interface name: IMyRefinery<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Parent: IMyProductionBlock
+
Parent: IMyProductionBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Spotlight
+
Spotlight<br />
Interface name: IMyReflectorLight
+
Interface name: IMyReflectorLight<br />
Parent: IMyLightingBlock
+
Parent: IMyLightingBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float Radius
+
float Radius<br />
float Intensity
+
float Intensity<br />
float BlinkIntervalSeconds
+
float BlinkIntervalSeconds<br />
float BlinkLenght
+
float BlinkLenght<br />
float BlinkOffset
+
float BlinkOffset<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseRadius -> Increase Radius
+
IncreaseRadius -> Increase Radius<br />
DecreaseRadius -> Decrease Radius
+
DecreaseRadius -> Decrease Radius<br />
IncreaseBlink Interval -> Increase Blink Interval
+
IncreaseBlink Interval -> Increase Blink Interval<br />
DecreaseBlink Interval -> Decrease Blink Interval
+
DecreaseBlink Interval -> Decrease Blink Interval<br />
IncreaseBlink Lenght -> Increase Blink Length
+
IncreaseBlink Lenght -> Increase Blink Length<br />
DecreaseBlink Lenght -> Decrease Blink Length
+
DecreaseBlink Lenght -> Decrease Blink Length<br />
IncreaseBlink Offset -> Increase Blink Offset
+
IncreaseBlink Offset -> Increase Blink Offset<br />
DecreaseBlink Offset -> Decrease Blink Offset
+
DecreaseBlink Offset -> Decrease Blink Offset<br />
  
Remote Control
+
Remote Control<br />
Interface name: IMyRemoteControl
+
Interface name: IMyRemoteControl<br />
Parent: IMyShipController
+
Parent: IMyShipController<br />
Fields:
+
Fields:<br />
bool ControlWheels
+
bool ControlWheels<br />
bool ControlThrusters
+
bool ControlThrusters<br />
bool HandBrake  
+
bool HandBrake <br />
bool DampenersOverride
+
bool DampenersOverride<br />
Actions:
+
Actions:<br />
ControlThrusters -> Control thrusters On/Off
+
ControlThrusters -> Control thrusters On/Off<br />
ControlWheels -> Control wheels On/Off
+
ControlWheels -> Control wheels On/Off<br />
HandBrake -> Handbrake On/Off
+
HandBrake -> Handbrake On/Off<br />
DampenersOverride -> Inertia dampeners On/Off
+
DampenersOverride -> Inertia dampeners On/Off<br />
Control -> Control
+
Control -> Control<br />
  
Rocket Launcher
+
Rocket Launcher<br />
Interface name: IMySmallMissileLauncher
+
Interface name: IMySmallMissileLauncher<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Reloadable Rocket Launcher
+
Reloadable Rocket Launcher<br />
Interface name: IMySmallMissileLauncherReload
+
Interface name: IMySmallMissileLauncherReload<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields: bool UseConveyorSystem
+
Fields: bool UseConveyorSystem<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Rotor
+
Rotor<br />
Interface name: IMyMotorStator
+
Interface name: IMyMotorStator<br />
Parent: IMyMotorBase
+
Parent: IMyMotorBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool IsAttached  
+
bool IsAttached <br />
float Torque
+
float Torque<br />
float BrakingTorque  
+
float BrakingTorque <br />
float Velocity  
+
float Velocity <br />
float LowerLimit  
+
float LowerLimit <br />
float UpperLimit  
+
float UpperLimit <br />
float Displacement  
+
float Displacement <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Reverse -> Reverse
+
Reverse -> Reverse<br />
Detach -> Detach
+
Detach -> Detach<br />
Attach -> Attach
+
Attach -> Attach<br />
IncreaseTorque -> Increase Torque
+
IncreaseTorque -> Increase Torque<br />
DecreaseTorque -> Decrease Torque
+
DecreaseTorque -> Decrease Torque<br />
IncreaseBrakingTorque -> Increase Braking tor.
+
IncreaseBrakingTorque -> Increase Braking tor.<br />
DecreaseBrakingTorque -> Decrease Braking tor.
+
DecreaseBrakingTorque -> Decrease Braking tor.<br />
IncreaseVelocity -> Increase Velocity
+
IncreaseVelocity -> Increase Velocity<br />
DecreaseVelocity -> Decrease Velocity
+
DecreaseVelocity -> Decrease Velocity<br />
ResetVelocity -> Reset Velocity
+
ResetVelocity -> Reset Velocity<br />
IncreaseLowerLimit -> Increase Lower limit
+
IncreaseLowerLimit -> Increase Lower limit<br />
DecreaseLowerLimit -> Decrease Lower limit
+
DecreaseLowerLimit -> Decrease Lower limit<br />
IncreaseUpperLimit -> Increase Upper limit
+
IncreaseUpperLimit -> Increase Upper limit<br />
DecreaseUpperLimit -> Decrease Upper limit
+
DecreaseUpperLimit -> Decrease Upper limit<br />
IncreaseDisplacement -> Increase Rotor displacement
+
IncreaseDisplacement -> Increase Rotor displacement<br />
DecreaseDisplacement -> Decrease Rotor displacement
+
DecreaseDisplacement -> Decrease Rotor displacement<br />
  
Sensor
+
Sensor<br />
Interface name: IMySensorBlock
+
Interface name: IMySensorBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float LeftExtend  
+
float LeftExtend <br />
float RightExtend  
+
float RightExtend <br />
float TopExtend  
+
float TopExtend <br />
float BottomExtend  
+
float BottomExtend <br />
float FrontExtend  
+
float FrontExtend <br />
float BackExtend  
+
float BackExtend <br />
bool DetectPlayers  
+
bool DetectPlayers <br />
bool DetectFloatingObjects  
+
bool DetectFloatingObjects <br />
bool DetectSmallShips  
+
bool DetectSmallShips <br />
bool DetectLargeShips  
+
bool DetectLargeShips <br />
bool DetectStations  
+
bool DetectStations <br />
bool DetectAsteroids  
+
bool DetectAsteroids <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseLeft -> Increase Left extent
+
IncreaseLeft -> Increase Left extent<br />
DecreaseLeft -> Decrease Left extent
+
DecreaseLeft -> Decrease Left extent<br />
IncreaseRight -> Increase Right extent
+
IncreaseRight -> Increase Right extent<br />
DecreaseRight -> Decrease Right extent
+
DecreaseRight -> Decrease Right extent<br />
IncreaseBottom -> Increase Bottom extent
+
IncreaseBottom -> Increase Bottom extent<br />
DecreaseBottom -> Decrease Bottom extent
+
DecreaseBottom -> Decrease Bottom extent<br />
IncreaseTop -> Increase Top extent
+
IncreaseTop -> Increase Top extent<br />
DecreaseTop -> Decrease Top extent
+
DecreaseTop -> Decrease Top extent<br />
IncreaseBack -> Increase Back extent
+
IncreaseBack -> Increase Back extent<br />
DecreaseBack -> Decrease Back extent
+
DecreaseBack -> Decrease Back extent<br />
IncreaseFront -> Increase Front extent
+
IncreaseFront -> Increase Front extent<br />
DecreaseFront -> Decrease Front extent
+
DecreaseFront -> Decrease Front extent<br />
Detect Players -> Detect players On/Off
+
Detect Players -> Detect players On/Off<br />
Detect Floating Objects -> Detect floating objects On/Off
+
Detect Floating Objects -> Detect floating objects On/Off<br />
Detect Small Ships -> Detect small ships On/Off
+
Detect Small Ships -> Detect small ships On/Off<br />
Detect Large Ships -> Detect large ships On/Off
+
Detect Large Ships -> Detect large ships On/Off<br />
Detect Stations -> Detect stations On/Off
+
Detect Stations -> Detect stations On/Off<br />
Detect Asteroids -> Detect Asteroids On/Off
+
Detect Asteroids -> Detect Asteroids On/Off<br />
  
Solar Panel
+
Solar Panel<br />
Interface name: IMySolarPanel
+
Interface name: IMySolarPanel<br />
Fields:None
+
Fields:None<br />
Actions:None
+
Actions:None<br />
  
Sound Block
+
Sound Block<br />
Interface name: IMySoundBlock
+
Interface name: IMySoundBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float Volume  
+
float Volume <br />
float Range  
+
float Range <br />
bool IsSoundSelected
+
bool IsSoundSelected<br />
float LoopPeriod  
+
float LoopPeriod <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseVolumeSlider -> Increase Volume
+
IncreaseVolumeSlider -> Increase Volume<br />
DecreaseVolumeSlider -> Decrease Volume
+
DecreaseVolumeSlider -> Decrease Volume<br />
IncreaseRangeSlider -> Increase Range
+
IncreaseRangeSlider -> Increase Range<br />
DecreaseRangeSlider -> Decrease Range
+
DecreaseRangeSlider -> Decrease Range<br />
PlaySound -> Play
+
PlaySound -> Play<br />
StopSound -> Stop
+
StopSound -> Stop<br />
IncreaseLoopableSlider -> Increase Loop time
+
IncreaseLoopableSlider -> Increase Loop time<br />
DecreaseLoopableSlider -> Decrease Loop time
+
DecreaseLoopableSlider -> Decrease Loop time<br />
  
Spherical Gravity Generator
+
Spherical Gravity Generator<br />
Interface name: IMyGravityGeneratorSphere
+
Interface name: IMyGravityGeneratorSphere<br />
Parent: IMyGravityGeneratorBase
+
Parent: IMyGravityGeneratorBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
float Radius  
+
float Radius <br />
float Gravity  
+
float Gravity <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseRadius -> Increase Radius
+
IncreaseRadius -> Increase Radius<br />
DecreaseRadius -> Decrease Radius
+
DecreaseRadius -> Decrease Radius<br />
IncreaseGravity -> Increase Acceleration
+
IncreaseGravity -> Increase Acceleration<br />
DecreaseGravity -> Decrease Acceleration
+
DecreaseGravity -> Decrease Acceleration<br />
  
Timer Block
+
Timer Block<br />
Interface name: IMyTimerBlock
+
Interface name: IMyTimerBlock<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool IsCountingDown  
+
bool IsCountingDown <br />
float TriggerDelay  
+
float TriggerDelay <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
IncreaseTriggerDelay -> Increase Delay
+
IncreaseTriggerDelay -> Increase Delay<br />
DecreaseTriggerDelay -> Decrease Delay
+
DecreaseTriggerDelay -> Decrease Delay<br />
TriggerNow -> Trigger now
+
TriggerNow -> Trigger now<br />
Start -> Start
+
Start -> Start<br />
Stop -> Stop
+
Stop -> Stop<br />
  
Warhead
+
Warhead<br />
Interface name: IMyWarhead
+
Interface name: IMyWarhead<br />
Fields:
+
Fields:<br />
bool IsCountingDown  
+
bool IsCountingDown <br />
float DetonationTime  
+
float DetonationTime <br />
Actions:
+
Actions:<br />
IncreaseDetonationTime -> Increase Detonation time
+
IncreaseDetonationTime -> Increase Detonation time<br />
DecreaseDetonationTime -> Decrease Detonation time
+
DecreaseDetonationTime -> Decrease Detonation time<br />
StartCountdown -> Start countdown
+
StartCountdown -> Start countdown<br />
StopCountdown -> Stop countdown
+
StopCountdown -> Stop countdown<br />
Safety -> Safety On/Off
+
Safety -> Safety On/Off<br />
Detonate -> Detonate
+
Detonate -> Detonate<br />
  
Welder
+
Welder<br />
Interface name: IMyShipWelder
+
Interface name: IMyShipWelder<br />
Parent: IMyShipToolBase
+
Parent: IMyShipToolBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
UseConveyor -> Use Conveyor System On/Off
+
UseConveyor -> Use Conveyor System On/Off<br />
  
Wheel Suspension 1x1
+
Wheel Suspension 1x1<br />
Interface name: IMyMotorSuspension
+
Interface name: IMyMotorSuspension<br />
Parent: IMyMotorBase
+
Parent: IMyMotorBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool Steering  
+
bool Steering <br />
bool Propulsion  
+
bool Propulsion <br />
float Damping  
+
float Damping <br />
float Strength  
+
float Strength <br />
float Friction  
+
float Friction <br />
float Power  
+
float Power <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Steering -> Steering On/Off
+
Steering -> Steering On/Off<br />
Propulsion -> Propulsion On/Off
+
Propulsion -> Propulsion On/Off<br />
IncreaseDamping -> Increase Damping
+
IncreaseDamping -> Increase Damping<br />
DecreaseDamping -> Decrease Damping
+
DecreaseDamping -> Decrease Damping<br />
IncreaseStrength -> Increase Strength
+
IncreaseStrength -> Increase Strength<br />
DecreaseStrength -> Decrease Strength
+
DecreaseStrength -> Decrease Strength<br />
IncreaseFriction -> Increase Friction
+
IncreaseFriction -> Increase Friction<br />
DecreaseFriction -> Decrease Friction
+
DecreaseFriction -> Decrease Friction<br />
IncreasePower -> Increase Power
+
IncreasePower -> Increase Power<br />
DecreasePower -> Decrease Power
+
DecreasePower -> Decrease Power<br />
  
Wheel Suspension 3x3
+
Wheel Suspension 3x3<br />
Interface name: IMyMotorSuspension
+
Interface name: IMyMotorSuspension<br />
Parent: IMyMotorBase
+
Parent: IMyMotorBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool Steering  
+
bool Steering<br />
bool Propulsion  
+
bool Propulsion <br />
float Damping  
+
float Damping <br />
float Strength  
+
float Strength <br />
float Friction  
+
float Friction <br />
float Power  
+
float Power <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Steering -> Steering On/Off
+
Steering -> Steering On/Off<br />
Propulsion -> Propulsion On/Off
+
Propulsion -> Propulsion On/Off<br />
IncreaseDamping -> Increase Damping
+
IncreaseDamping -> Increase Damping<br />
DecreaseDamping -> Decrease Damping
+
DecreaseDamping -> Decrease Damping<br />
IncreaseStrength -> Increase Strength
+
IncreaseStrength -> Increase Strength<br />
DecreaseStrength -> Decrease Strength
+
DecreaseStrength -> Decrease Strength<br />
IncreaseFriction -> Increase Friction
+
IncreaseFriction -> Increase Friction<br />
DecreaseFriction -> Decrease Friction
+
DecreaseFriction -> Decrease Friction<br />
IncreasePower -> Increase Power
+
IncreasePower -> Increase Power<br />
DecreasePower -> Decrease Power
+
DecreasePower -> Decrease Power<br />
  
Wheel Suspension 5x5
+
Wheel Suspension 5x5<br />
Interface name: IMyMotorSuspension
+
Interface name: IMyMotorSuspension<br />
Parent: IMyMotorBase
+
Parent: IMyMotorBase<br />
Parent: IMyFunctionalBlock
+
Parent: IMyFunctionalBlock<br />
Fields:
+
Fields:<br />
bool Steering  
+
bool Steering <br />
bool Propulsion  
+
bool Propulsion <br />
float Damping  
+
float Damping <br />
float Strength  
+
float Strength <br />
float Friction  
+
float Friction <br />
float Power  
+
float Power <br />
Actions:
+
Actions:<br />
OnOff -> Toggle block On/Off
+
OnOff -> Toggle block On/Off<br />
OnOff_On -> Toggle block On
+
OnOff_On -> Toggle block On<br />
OnOff_Off -> Toggle block Off
+
OnOff_Off -> Toggle block Off<br />
Steering -> Steering On/Off
+
Steering -> Steering On/Off<br />
Propulsion -> Propulsion On/Off
+
Propulsion -> Propulsion On/Off<br />
IncreaseDamping -> Increase Damping
+
IncreaseDamping -> Increase Damping<br />
DecreaseDamping -> Decrease Damping
+
DecreaseDamping -> Decrease Damping<br />
IncreaseStrength -> Increase Strength
+
IncreaseStrength -> Increase Strength<br />
DecreaseStrength -> Decrease Strength
+
DecreaseStrength -> Decrease Strength<br />
IncreaseFriction -> Increase Friction
+
IncreaseFriction -> Increase Friction<br />
DecreaseFriction -> Decrease Friction
+
DecreaseFriction -> Decrease Friction<br />
IncreasePower -> Increase Power
+
IncreasePower -> Increase Power<br /><br />
DecreasePower -> Decrease Power
+
DecreasePower -> Decrease Power<br />
Programmable block video
+
Programmable block video<br />
  
  
  
EDIT 01/02/15 - Changes: Allowed namespaces
+
EDIT 01/02/15 - Changes: Allowed namespaces<br />
Currently you can use only the following namespaces from Modding API:
+
Currently you can use only the following namespaces from Modding API:<br />
Sandbox.ModAPI.Ingame
+
Sandbox.ModAPI.Ingame<br />
Sandbox.ModAPI.Interfaces
+
Sandbox.ModAPI.Interfaces<br />
Sandbox.Common.ObjectBuilders
+
Sandbox.Common.ObjectBuilders<br />
VRageMath
+
VRageMath<br />
VRage
+
VRage<br />
  
 
You cannot use Sandbox.ModAPI namespace or any other game namespaces
 
You cannot use Sandbox.ModAPI namespace or any other game namespaces

Revision as of 08:23, 9 January 2015

Known Limitations

Below is a list of the known limitations that we are aware of and the possible workarounds for each of them:

Foreach not working at 64- bit

Problem: Currently using of foreach loop inside script will cause “bad program exception” at some configurations and prevent script from running. We are working of fixing this issue.

Workaround: All our interfaces used in in-game scripting are using lists as collections. Please use For loop for iteration across these lists

Lambda functions not working

Problem: Currently lambda functions are not supported, if you use them in script, exception will be thrown and script will not run.

Workaround: Please use method instead of lambda function if possible.

User defined static variables and methods not working

Problem: Currently using user defined static members or methods will cause script to throw exception and the script will not run.

Workaround: Please don’t define static methods or variables.

User defined variables are not saved

Problem: None of user defined variables inside the script is saved, therefore after loading the game they are reset into their default values.

Workaround: None.

GUI Overview

Programmable block

The programmable block terminal panel screen currently contains two buttons:

Edit – it will open the editor for editing scripts and the ability to save/load scripts from and to disk. Also, you can upload your scripts to workshop and download subscribed scripts.

Run – it will run the script that was remembered in editor. It will run the script only once. However this button is terminal action, so you can attach it to sensor, timer block, and button or add it to toolbar.

Steamworkshop webupload previewfile 360966557 preview.jpg

Details section – In this area the script exception will be shown (if any will occur)

Editor

Steamworkshop webupload previewfile 360966557 preview (1).jpg

Code editor contains these buttons: Help – it will open the help guide inside the game. Check Code – it will check the code for code mistakes and also check if used code isn’t forbidden. Remember & Exit – it will save the code for execution, close editor screen and returns to terminal panel. Remember code – it will save code for execution and leave editor open. Browse Workshop – it will open a window for script management, you can save/load scripts from disk , upload scripts to workshop and download subscribed scripts. Line counter – it shows current line number and total number of lines in code

Browse Workshop

Browse workshop.jpg

This screen is similar to blueprint screen and contains these buttons : Ok – it will load the selected script into the editor and close the screen Cancel – it will close the screen (no changes to code in editor) Details – it will open the "details" screen, where you can see description of script Rename (only for local scripts) – it will rename the selected script, if you try to rename to existing script, the game will ask you if you want to overwrite the existing script. Delete (only for local scripts) – it will ask you if you really want to delete the script, after the confirmation script will be deleted. Create from editor– it will create new script with default name Script_XX it starts with 0 and if the script with the selected name already exists, it will increment the value. E.g. first there will be Script_0 then Script_1 etc… Replace from editor (only for local scripts) – it will replace (after user confirmation) the selected script with script from the editor. Refresh Scripts – will reload the local and subscribed script list

Details (local script)

Details (local script).jpg

This screen will show up when you press details for local script and contains the following buttons: Rename – it will rename the selected script, if you try to rename to existing script, the game will ask if you want to overwrite the existing script. Delete – it will ask you if you want to delete the script, after confirmation script will be deleted. Publish – it will publish the script into workshop and show the workshop page with the script. Browse Workshop – it will open the workshop screen to browse and subscribe scripts. Close – it will close the screen

Details (workshop script)

This screen will show up when you press details for script from workshop and it contains these buttons: Open in Workshop – it will open the current script workshop page. Close – it will close the screen Programming Guide Introduction

Editor access Only one player can edit same script at time. If someone else have open editor for current block and someone else will try to open editor, notification will be shown that editor is already open.

Main method When editor is opened for first time, void Main() method is present inside code editor. This is entry point that will be called when executing script. If Main method is removed / renamed, script will not run and you will be notified in programmable block details area. Custom methods/variables can be defined and used, but only Main method will be called by script.

Variables life There are two types of variables for script: Local (inside the methods) – these variables will keep theirs value only during execution of method. Value will be “lost” when method ends. Global (outside the methods) - these variables will keep theirs values during lifetime of script. E.g. If variable needs to keep value between separate runs of program ,it needs to be defined outside the methods. After pressing “Remember&Exit” or “Remember” buttons, previous script will be overwritten and all Global variables will be lost.

Compiling When “Check code” button is pressed, code will be compiled and result of compilation will be shown. There are two steps of compilation process: First code inside editor is compiled by c# compiler for language errors. If there is any error during compilation following dialog is shown: It this case “aaa” string is placed before Main method. This is wrong language construction and compilation failed. In error dialog Line number error and description of the error is shown.

After compilation, code is check for usage of not allowed namespaces and types. In case that check fails, Following dialog is shown: In this case System.IO.Directory was used to delete some directory. This is forbidden and error is shown that “Not allowed type was used in script”.

If compilation and check passes following dialog is shown: This means that code doesn’t contain any language errors or not allowed methods.

Script execution When “Run” button is pressed or “Run” is assigned as terminal action, script is executed. Currently “Run” needs to be called manually e.g. user need to click on “Run” button or attach it as terminal action. Script is executed only on server even if it’s triggered from client. If there is any exception during script execution, all clients will be notified in programmable block details area about failure. In case of exception during script execution, script will not run again unless User opens editor and change script.

Counting of instructions Every time script is executed, every instruction of script is counted. If script executes more instruction than limit, execution is stopped and user is notified that script is too complex for execution. This prevents scripts to “freeze” game.

Available interfaces

Possible actions Currently only terminal actions can be triggered inside scripts. User can access terminal system for grid on which programmable block is located and trigger any terminal action on any block at grid.

GridTerminalSystem variable Currently only following “built-in” variable that user can use: GridTerminalSystem. This is entry point of entire grid terminal system.
It has following methods available:
List<IMyTerminalBlock> Blocks{get;}
List<IMyBlockGroup> BlockGroups { get; }
void GetBlocksOfType<T>(List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null);
void SearchBlocksOfName(string name,List<IMyTerminalBlock> blocks, Func<IMyTerminalBlock, bool> collect = null);
IMyTerminalBlock GetBlockWithName(string name);
With these methods all terminal blocks of grid can be collected.

Blocks property will get all block of grid terminal, this method internally allocates new memory.
BlockGroups will get all groups of grid terminal, this method internally allocates new memory
GetBlocksOfType will get all blocks of given type.
SearchBlocksOfName method will fulltext search between all blocks and returns block that contains searched string , search is case insensitive.
GetBlockWithName method will get first block with exact name as provided , search is case sensitive.

Func<IMyTerminalBlock, bool> collect method can be used for defining search condition within search. E.g. Collect method for IMyRadioAntenna can define search function to search only for turned on antennas or antennas with specific range.

IMyCubeBlock
IMyCubeBlock is base class for every terminal block. It has following Properties and methods:
bool IsBeingHacked { get; }
bool IsFunctional { get; }
bool IsWorking { get; }
VRageMath.Vector3I Position { get; }

IsFunctional property tells if current block is constructed to the level it can operate
IsWorking property tells if current block is powered
  IMyTerminalBlock
IMyTerminalBlock is base class for every terminal block, all of the block will have following properties and methods:

string CustomName
string CustomNameWithFaction
string DetailedInfo
bool HasLocalPlayerAccess()
bool HasPlayerAccess(long playerId)
void RequestShowOnHUD(bool enable)
void SetCustomName(string text)
void SetCustomName(StringBuilder text)
bool ShowOnHUD
void GetActions(List<Sandbox.ModAPI.Interfaces.ITerminalAction> resultList, Func<Sandbox.ModAPI.Interfaces.ITerminalAction, bool> collect = null);
void SearchActionsOfName(string name,List<Sandbox.ModAPI.Interfaces.ITerminalAction> resultList, Func<Sandbox.ModAPI.Interfaces.ITerminalAction, bool> collect = null);
Sandbox.ModAPI.Interfaces.ITerminalAction GetActionWithName(string name);

GetActions method will get all action available for current block.
SearchActionsOfName method will fulltext search between all blocks actions and returns actions that contains searched string e.g. if block has actions : OnOff ,OnOff_On ,OnOff_Off

SearchActionsOfName with “OnOff” returns all actions SearchActionsOfName with _On will return only “OnOff_On”, searching with “On” will return all actions, search is case insensitive.

GetActionWithName method will get first action with exact name as provided , search is case sensitive.

ITerminalAction
ITerminal action is representation of concrete action that can be triggered. It has following properties and methods:
string Id { get; }
StringBuilder Name { get; }
void Apply(Sandbox.ModAPI.Ingame.IMyCubeBlock block);

Id is Id of action e.g. OnOff, OnOff_On
Name is name of the action shown in UI e.g. Toggle block On/Off ,Toggle block On
Apply will apply action for given block (you need to provide block from which you took actions)

IMyFunctionalBlock
IMyFunctionalBlock is base class for every block that can be turned on or off, it’s derived from IMyTerminal block e.g. every Functional block is Terminal block but not all terminal blocks can be turned on or off.
It has one Property:
bool Enabled
This property indicates if block is turned on or off by user.
Terminal block and action name list - 1/3
Disclaimer
All terminal blocks have the following properties:
Interface name: this name is the name of the block in code, it can differ from the name as displayed in the building screen. E.g. Antenna interface name is IMyRadioAntenna - you need to use this interface if you want to get all antennas.

Parent: this is parent of the block (all blocks have IMyTerminalBlock as parent), this can be used for getting type of blocks instead of concrete block type. E.g. if you want to get all lights in grid you will use IMyLightingBlock, if you want only interior light you can use IMyInteriorLight.

Field: this is read only field available for block e.g. for IMyBeacon you can get Radius property. Based on this property you can increase/decrease radius of beacon.

Actions: these are all available actions for block with their names in game, so if you want to increase broadcast radius for antenna, you need to execute DecreaseRadius action for block.

Same block class for different SubTypeID
Some blocks have same parent (e.g. <TypeId> in cubeblocks.sbc) and differs only by subtype (e.g. <SubtypeId>). This means there is no distinction between these block in code.
Example of these blocks is the Cargo Container: there are 3 types of cargo containers in the game: small, medium and large. These three types differ only by subtype and Type is same for them e.g. large cargo container id is:
<Id>
<TypeId>CargoContainer</TypeId>
<SubtypeId>LargeBlockLargeContainer</SubtypeId>
</Id>
Medium is:
<Id>
<TypeId>CargoContainer</TypeId>
<SubtypeId>SmallBlockMediumContainer</SubtypeId>
</Id>
And small is:
<Id>
<TypeId>CargoContainer</TypeId>
<SubtypeId>LargeBlockSmallContainer</SubtypeId>
</Id>

In this case there is only one class IMyCargoContainer for all types of cargo containers.

Antenna
Interface name: IMyRadioAntenna
Parent: IMyFunctionalBlock
Fields: float Radius
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseRadius -> Increase Broadcast radius
DecreaseRadius -> Decrease Broadcast radius

Arc furnace
Interface name: IMyRefinery
Parent: IMyProductionBlock
Parent: IMyFunctionalBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Artificial Mass
Interface name: IMyVirtualMass
Parent: IMyFunctionalBlock
Fields: None
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off

Assembler
Interface name: IMyAssembler
Parent: IMyProductionBlock
Parent: IMyFunctionalBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Battery
Interface name: IMyBatteryBlock
Parent: IMyFunctionalBlock
Fields: bool HasCapacityRemaining
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Recharge -> Recharge On/Off

Beacon
Interface name: IMyBeacon
Parent: IMyFunctionalBlock
Fields: float Radius
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseRadius -> Increase Broadcast radius
DecreaseRadius -> Decrease Broadcast radius

Button Panel
Interface name: IMyButtonPanel
Fields: bool AnyoneCanUse
Actions:
AnyoneCanUse -> Anyone Can Use On/Off

Camera
Interface name: IMyCameraBlock
Parent: IMyFunctionalBlock
Fields: None
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
View -> View

Cockpit
Interface name: IMyCockpit
Parent: IMyShipController
Fields:
bool ControlWheels
bool ControlThrusters
bool HandBrake
bool DampenersOverride
Actions:
ControlThrusters -> Control thrusters On/Off
ControlWheels -> Control wheels On/Off
HandBrake -> Handbrake On/Off
DampenersOverride -> Inertia dampeners On/Off

Collector
Interface name: IMyCollector
Parent: IMyFunctionalBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Connector
Interface name: IMyShipConnector
Parent: IMyFunctionalBlock
Fields:
bool ThrowOut
bool CollectAll
bool IsLocked
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
ThrowOut -> Throw Out On/Off
CollectAll -> Collect All On/Off
SwitchLock -> Switch lock

Control Panel
Interface name: IMyControlPanel
Fields: None
Actions: None

Control Station
Interface name: IMyCockpit
Parent: IMyShipController
Fields:
bool ControlWheels
bool ControlThrusters
bool HandBrake
bool DampenersOverride
Actions:
ControlThrusters -> Control thrusters On/Off
ControlWheels -> Control wheels On/Off
HandBrake -> Handbrake On/Off
DampenersOverride -> Inertia dampeners On/Off

Door
Interface name: IMyDoor
Parent: IMyFunctionalBlock
Fields: bool Open
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Open -> Open/Closed
Open_On -> Open
Open_Off -> Closed

Drill
Interface name: IMyShipDrill
Parent: IMyFunctionalBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Flight Seat
Interface name: IMyCockpit
Parent: IMyShipController
Fields:
bool ControlWheels
bool ControlThrusters
bool HandBrake
bool DampenersOverride
Actions:
ControlThrusters -> Control thrusters On/Off
ControlWheels -> Control wheels On/Off
HandBrake -> Handbrake On/Off
DampenersOverride -> Inertia dampeners On/Off

Gatling Turret
Interface name: IMyLargeGatlingTurret
Parent: IMyLargeConveyorTurretBase
Parent: IMyLargeTurretBase
Parent: IMyFunctionalBlock
Fields:
bool UseConveyorSystem
bool CanControl
float Range
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Control -> Control
IncreaseRange -> Increase Radius
DecreaseRange -> Decrease Radius
UseConveyor -> Use Conveyor System On/Off

Gravity Generator
Interface name: IMyGravityGenerator
Parent: IMyGravityGeneratorBase
Parent: IMyFunctionalBlock
Fields:
float FieldWidth
float FieldHeight
float FieldDepth
float Gravity
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseWidth -> Increase Field width
DecreaseWidth -> Decrease Field width
IncreaseHeight -> Increase Field height
DecreaseHeight -> Decrease Field height
IncreaseDepth -> Increase Field depth
DecreaseDepth -> Decrease Field depth
IncreaseGravity -> Increase Acceleration
DecreaseGravity -> Decrease Acceleration

Grinder
Interface name: IMyShipGrinder
Parent: IMyShipToolBase
Parent: IMyFunctionalBlock
Fields: None
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Gyroscope
Interface name: IMyGyro
Parent: IMyFunctionalBlock
Fields:
float GyroPower
bool GyroOverride
float Yaw
float Pitch
float Roll
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreasePower -> Increase Power
DecreasePower -> Decrease Power
Override -> Override controls On/Off
IncreaseYaw -> Increase Yaw override
DecreaseYaw -> Decrease Yaw override
IncreasePitch -> Increase Pitch override
DecreasePitch -> Decrease Pitch override
IncreaseRoll -> Increase Roll override
DecreaseRoll -> Decrease Roll override
Terminal block and action name list - 2/3
Interior Light
Interface name: IMyInteriorLight
Parent: IMyLightingBlock
Parent: IMyFunctionalBlock
Fields:
float Radius
float Intensity
float BlinkIntervalSeconds
float BlinkLenght
float BlinkOffset
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseRadius -> Increase Radius
DecreaseRadius -> Decrease Radius
IncreaseBlink Interval -> Increase Blink Interval
DecreaseBlink Interval -> Decrease Blink Interval
IncreaseBlink Lenght -> Increase Blink Length
DecreaseBlink Lenght -> Decrease Blink Length
IncreaseBlink Offset -> Increase Blink Offset
DecreaseBlink Offset -> Decrease Blink Offset

Interior Turret
Interface name: IMyLargeInteriorTurret
Parent: IMyLargeTurretBase
Parent: IMyFunctionalBlock
Fields:
bool CanControl
float Range
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Control -> Control
IncreaseRange -> Increase Radius
DecreaseRange -> Decrease Radius

Landing Gear
Interface name: IMyLandingGear
Parent: IMyFunctionalBlock
Fields:
float BreakForce
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Lock -> Lock
Unlock -> Unlock
SwitchLock -> Switch lock
Autolock -> Autolock On/Off
IncreaseBreakForce -> Increase Break Force
DecreaseBreakForce -> Decrease Break Force

Small Cargo Container
Interface name: IMyCargoContainer
Fields: None
Actions: None

Medium Cargo Container
Interface name: IMyCargoContainer
Fields: None
Actions:None

Large Cargo Container
Interface name: IMyCargoContainer
Fields: None
Actions: None

Small Reactor
Interface name: IMyReactor
Parent: IMyFunctionalBlock
Fields:
bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Large Reactor
Interface name: IMyReactor
Parent: IMyFunctionalBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Small Thruster
Interface name: IMyThrust
Parent: IMyFunctionalBlock
Fields: float ThrustOverride
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseOverride -> Increase Thrust override
DecreaseOverride -> Decrease Thrust override

Large Thruster
Interface name: IMyThrust
Parent: IMyFunctionalBlock
Fields: float ThrustOverride
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseOverride -> Increase Thrust override
DecreaseOverride -> Decrease Thrust override

Medical Room
Interface name: IMyMedicalRoom
Parent: IMyFunctionalBlock
Fields: None
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off

Merge Block
Interface name: IMyShipMergeBlock
Parent: IMyFunctionalBlock
Fields: None
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off

Missile Turret
Interface name: IMyLargeMissileTurret
Parent: IMyLargeConveyorTurretBase
Parent: IMyLargeTurretBase
Parent: IMyFunctionalBlock
Fields:
bool UseConveyorSystem
bool CanControl
float Range
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Control -> Control
IncreaseRange -> Increase Radius
DecreaseRange -> Decrease Radius
UseConveyor -> Use Conveyor System On/Off

Ore Detector
Interace name: IMyOreDetector
Parent: IMyFunctionalBlock
Fields:
float Range
bool BroadcastUsingAntennas
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off

Passenger Seat
Interface name: IMyCockpit
Parent: IMyShipController
Fields:
bool ControlWheels
bool ControlThrusters
bool HandBrake
bool DampenersOverride
Actions:
ControlThrusters -> Control thrusters On/Off
ControlWheels -> Control wheels On/Off
HandBrake -> Handbrake On/Off
DampenersOverride -> Inertia dampeners On/Off

Piston
Interface name: IMyPistonBase
Parent: IMyFunctionalBlock
Fields:
float Velocity
float MinLimit
float MaxLimit
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Reverse -> Reverse
IncreaseVelocity -> Increase Velocity
DecreaseVelocity -> Decrease Velocity
ResetVelocity -> Reset Velocity
IncreaseUpperLimit -> Increase Maximal distance
DecreaseUpperLimit -> Decrease Maximal distance
IncreaseLowerLimit -> Increase Minimal distance
DecreaseLowerLimit -> Decrease Minimal distance

Programmable block
Interface name: IMyProgrammableBlock
Parent: IMyFunctionalBlock
Fields: bool IsRunning
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Run -> Run Terminal block and action name list - 3/3
Refinery
Interface name: IMyRefinery
Parent: IMyFunctionalBlock
Parent: IMyProductionBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Spotlight
Interface name: IMyReflectorLight
Parent: IMyLightingBlock
Parent: IMyFunctionalBlock
Fields:
float Radius
float Intensity
float BlinkIntervalSeconds
float BlinkLenght
float BlinkOffset
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseRadius -> Increase Radius
DecreaseRadius -> Decrease Radius
IncreaseBlink Interval -> Increase Blink Interval
DecreaseBlink Interval -> Decrease Blink Interval
IncreaseBlink Lenght -> Increase Blink Length
DecreaseBlink Lenght -> Decrease Blink Length
IncreaseBlink Offset -> Increase Blink Offset
DecreaseBlink Offset -> Decrease Blink Offset

Remote Control
Interface name: IMyRemoteControl
Parent: IMyShipController
Fields:
bool ControlWheels
bool ControlThrusters
bool HandBrake
bool DampenersOverride
Actions:
ControlThrusters -> Control thrusters On/Off
ControlWheels -> Control wheels On/Off
HandBrake -> Handbrake On/Off
DampenersOverride -> Inertia dampeners On/Off
Control -> Control

Rocket Launcher
Interface name: IMySmallMissileLauncher
Parent: IMyFunctionalBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Reloadable Rocket Launcher
Interface name: IMySmallMissileLauncherReload
Parent: IMyFunctionalBlock
Fields: bool UseConveyorSystem
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Rotor
Interface name: IMyMotorStator
Parent: IMyMotorBase
Parent: IMyFunctionalBlock
Fields:
bool IsAttached
float Torque
float BrakingTorque
float Velocity
float LowerLimit
float UpperLimit
float Displacement
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Reverse -> Reverse
Detach -> Detach
Attach -> Attach
IncreaseTorque -> Increase Torque
DecreaseTorque -> Decrease Torque
IncreaseBrakingTorque -> Increase Braking tor.
DecreaseBrakingTorque -> Decrease Braking tor.
IncreaseVelocity -> Increase Velocity
DecreaseVelocity -> Decrease Velocity
ResetVelocity -> Reset Velocity
IncreaseLowerLimit -> Increase Lower limit
DecreaseLowerLimit -> Decrease Lower limit
IncreaseUpperLimit -> Increase Upper limit
DecreaseUpperLimit -> Decrease Upper limit
IncreaseDisplacement -> Increase Rotor displacement
DecreaseDisplacement -> Decrease Rotor displacement

Sensor
Interface name: IMySensorBlock
Parent: IMyFunctionalBlock
Fields:
float LeftExtend
float RightExtend
float TopExtend
float BottomExtend
float FrontExtend
float BackExtend
bool DetectPlayers
bool DetectFloatingObjects
bool DetectSmallShips
bool DetectLargeShips
bool DetectStations
bool DetectAsteroids
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseLeft -> Increase Left extent
DecreaseLeft -> Decrease Left extent
IncreaseRight -> Increase Right extent
DecreaseRight -> Decrease Right extent
IncreaseBottom -> Increase Bottom extent
DecreaseBottom -> Decrease Bottom extent
IncreaseTop -> Increase Top extent
DecreaseTop -> Decrease Top extent
IncreaseBack -> Increase Back extent
DecreaseBack -> Decrease Back extent
IncreaseFront -> Increase Front extent
DecreaseFront -> Decrease Front extent
Detect Players -> Detect players On/Off
Detect Floating Objects -> Detect floating objects On/Off
Detect Small Ships -> Detect small ships On/Off
Detect Large Ships -> Detect large ships On/Off
Detect Stations -> Detect stations On/Off
Detect Asteroids -> Detect Asteroids On/Off

Solar Panel
Interface name: IMySolarPanel
Fields:None
Actions:None

Sound Block
Interface name: IMySoundBlock
Parent: IMyFunctionalBlock
Fields:
float Volume
float Range
bool IsSoundSelected
float LoopPeriod
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseVolumeSlider -> Increase Volume
DecreaseVolumeSlider -> Decrease Volume
IncreaseRangeSlider -> Increase Range
DecreaseRangeSlider -> Decrease Range
PlaySound -> Play
StopSound -> Stop
IncreaseLoopableSlider -> Increase Loop time
DecreaseLoopableSlider -> Decrease Loop time

Spherical Gravity Generator
Interface name: IMyGravityGeneratorSphere
Parent: IMyGravityGeneratorBase
Parent: IMyFunctionalBlock
Fields:
float Radius
float Gravity
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseRadius -> Increase Radius
DecreaseRadius -> Decrease Radius
IncreaseGravity -> Increase Acceleration
DecreaseGravity -> Decrease Acceleration

Timer Block
Interface name: IMyTimerBlock
Parent: IMyFunctionalBlock
Fields:
bool IsCountingDown
float TriggerDelay
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseTriggerDelay -> Increase Delay
DecreaseTriggerDelay -> Decrease Delay
TriggerNow -> Trigger now
Start -> Start
Stop -> Stop

Warhead
Interface name: IMyWarhead
Fields:
bool IsCountingDown
float DetonationTime
Actions:
IncreaseDetonationTime -> Increase Detonation time
DecreaseDetonationTime -> Decrease Detonation time
StartCountdown -> Start countdown
StopCountdown -> Stop countdown
Safety -> Safety On/Off
Detonate -> Detonate

Welder
Interface name: IMyShipWelder
Parent: IMyShipToolBase
Parent: IMyFunctionalBlock
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
UseConveyor -> Use Conveyor System On/Off

Wheel Suspension 1x1
Interface name: IMyMotorSuspension
Parent: IMyMotorBase
Parent: IMyFunctionalBlock
Fields:
bool Steering
bool Propulsion
float Damping
float Strength
float Friction
float Power
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Steering -> Steering On/Off
Propulsion -> Propulsion On/Off
IncreaseDamping -> Increase Damping
DecreaseDamping -> Decrease Damping
IncreaseStrength -> Increase Strength
DecreaseStrength -> Decrease Strength
IncreaseFriction -> Increase Friction
DecreaseFriction -> Decrease Friction
IncreasePower -> Increase Power
DecreasePower -> Decrease Power

Wheel Suspension 3x3
Interface name: IMyMotorSuspension
Parent: IMyMotorBase
Parent: IMyFunctionalBlock
Fields:
bool Steering
bool Propulsion
float Damping
float Strength
float Friction
float Power
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Steering -> Steering On/Off
Propulsion -> Propulsion On/Off
IncreaseDamping -> Increase Damping
DecreaseDamping -> Decrease Damping
IncreaseStrength -> Increase Strength
DecreaseStrength -> Decrease Strength
IncreaseFriction -> Increase Friction
DecreaseFriction -> Decrease Friction
IncreasePower -> Increase Power
DecreasePower -> Decrease Power

Wheel Suspension 5x5
Interface name: IMyMotorSuspension
Parent: IMyMotorBase
Parent: IMyFunctionalBlock
Fields:
bool Steering
bool Propulsion
float Damping
float Strength
float Friction
float Power
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
Steering -> Steering On/Off
Propulsion -> Propulsion On/Off
IncreaseDamping -> Increase Damping
DecreaseDamping -> Decrease Damping
IncreaseStrength -> Increase Strength
DecreaseStrength -> Decrease Strength
IncreaseFriction -> Increase Friction
DecreaseFriction -> Decrease Friction
IncreasePower -> Increase Power

DecreasePower -> Decrease Power
Programmable block video


EDIT 01/02/15 - Changes: Allowed namespaces
Currently you can use only the following namespaces from Modding API:
Sandbox.ModAPI.Ingame
Sandbox.ModAPI.Interfaces
Sandbox.Common.ObjectBuilders
VRageMath
VRage

You cannot use Sandbox.ModAPI namespace or any other game namespaces