Space Engineers
Protected Member Functions | Properties | List of all members
Sandbox.ModAPI.Ingame.MyGridProgram Class Reference

All programmable block scripts derive from this class, meaning that all properties in this class are directly available for use in your scripts. If you use Visual Studio or other external editors to write your scripts, you can derive directly from this class and have a compatible script template. More...

Inheritance diagram for Sandbox.ModAPI.Ingame.MyGridProgram:
Sandbox.ModAPI.IMyGridProgram

Protected Member Functions

 MyGridProgram ()
 

Properties

virtual IMyGridTerminalSystem GridTerminalSystem [get, protected set]
 Provides access to the grid terminal system as viewed from this programmable block. More...
 
virtual IMyProgrammableBlock Me [get, protected set]
 Gets a reference to the currently running programmable block. More...
 
virtual TimeSpan ElapsedTime [get, protected set]
 Gets the amount of in-game time elapsed from the previous run. More...
 
virtual IMyGridProgramRuntimeInfo Runtime [get, protected set]
 Gets runtime information for the running grid program. More...
 
virtual string Storage [get, protected set]
 Allows you to store data between game sessions. More...
 
Action< string > Echo [get, protected set]
 Prints out text onto the currently running programmable block's detail info area. More...
 
- Properties inherited from Sandbox.ModAPI.IMyGridProgram
Ingame.IMyGridTerminalSystem GridTerminalSystem [get, set]
 Gets or sets the GridTerminalSystem available for the grid programs. More...
 
Ingame.IMyProgrammableBlock Me [get, set]
 Gets or sets the programmable block which is currently running this grid program. More...
 
TimeSpan ElapsedTime [get, set]
 Gets or sets the amount of time elapsed since the last time this grid program was run. More...
 
string Storage [get, set]
 Gets or sets the storage string for this grid program. More...
 
IMyGridProgramRuntimeInfo Runtime [get, set]
 Gets or sets the object used to provide runtime information for the running grid program. More...
 
Action< string > Echo [get, set]
 Gets or sets the action which prints out text onto the currently running programmable block's detail info area. More...
 
bool HasMainMethod [get]
 Determines whether this grid program has a valid Main method. More...
 
bool HasSaveMethod [get]
 Determines whether this grid program has a valid Save method. More...
 

Additional Inherited Members

Detailed Description

All programmable block scripts derive from this class, meaning that all properties in this class are directly available for use in your scripts. If you use Visual Studio or other external editors to write your scripts, you can derive directly from this class and have a compatible script template.

public void Main() { // Print out the time elapsed since the currently running programmable block was run // the last time. Echo(Me.CustomName + " was last run " + Runtime.TimeSinceLastRun.TotalSeconds + " seconds ago."); }

Definition at line 23 of file MyGridProgram.cs.

Constructor & Destructor Documentation

Sandbox.ModAPI.Ingame.MyGridProgram.MyGridProgram ( )
inlineprotected

Definition at line 43 of file MyGridProgram.cs.

Property Documentation

Action<string> Sandbox.ModAPI.Ingame.MyGridProgram.Echo
getprotected set

Prints out text onto the currently running programmable block's detail info area.

Definition at line 102 of file MyGridProgram.cs.

virtual TimeSpan Sandbox.ModAPI.Ingame.MyGridProgram.ElapsedTime
getprotected set

Gets the amount of in-game time elapsed from the previous run.

Definition at line 83 of file MyGridProgram.cs.

virtual IMyGridTerminalSystem Sandbox.ModAPI.Ingame.MyGridProgram.GridTerminalSystem
getprotected set

Provides access to the grid terminal system as viewed from this programmable block.

Definition at line 72 of file MyGridProgram.cs.

virtual IMyProgrammableBlock Sandbox.ModAPI.Ingame.MyGridProgram.Me
getprotected set

Gets a reference to the currently running programmable block.

Definition at line 77 of file MyGridProgram.cs.

virtual IMyGridProgramRuntimeInfo Sandbox.ModAPI.Ingame.MyGridProgram.Runtime
getprotected set

Gets runtime information for the running grid program.

Definition at line 88 of file MyGridProgram.cs.

virtual string Sandbox.ModAPI.Ingame.MyGridProgram.Storage
getprotected set

Allows you to store data between game sessions.

Definition at line 94 of file MyGridProgram.cs.


The documentation for this class was generated from the following file: