Interface IMyProgrammableBlock
Describes programmable block (mods interface)
Inherited Members
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyProgrammableBlock : IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyProgrammableBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyTextSurfaceProvider
Properties
HasCompileErrors
Returns true if the script has compile errors (server only!)
Declaration
bool HasCompileErrors { get; }
Property Value
Type | Description |
---|---|
System. |
ProgramData
Program contents. Automatically recompiles when set, if possible.
Declaration
string ProgramData { get; set; }
Property Value
Type | Description |
---|---|
System. |
StorageData
Program storage (server only!)
Declaration
string StorageData { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
Recompile()
Recompiles script
Declaration
void Recompile()
Run()
Runs with default terminal argument
Declaration
void Run()
Run(String)
Runs with specified argument
Declaration
void Run(string argument)
Parameters
Type | Name | Description |
---|---|---|
System. |
argument |
Run(String, UpdateType)
Runs with the specified argument and update source
Declaration
void Run(string argument, UpdateType updateSource)
Parameters
Type | Name | Description |
---|---|---|
System. |
argument | |
Update |
updateSource |
TryRun(String)
Attempts to run this programmable block using the given argument. An already running
programmable block cannot be run again.
This is equivalent to running block.ApplyAction("Run", argumentsList);
This should be called from an ingame script. Do not use in mods.
Declaration
bool TryRun(string argument)
Parameters
Type | Name | Description |
---|---|---|
System. |
argument |
Returns
Type | Description |
---|---|
System. |
|