This repository was archived by the owner on Dec 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Sandbox.ModAPI.Ingame.MyGridProgram
Morten Aune Lyrstad edited this page Feb 17, 2020
·
53 revisions
← Index ← Namespace Index
public abstract class MyGridProgram: IMyGridProgramAll 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.
Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Implements:
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.");
}
| Member | Description |
|---|---|
| GridTerminalSystem { get; protected set; } | Provides access to the grid terminal system as viewed from this programmable block. |
| Me { get; protected set; } | Gets a reference to the currently running programmable block. |
| ElapsedTime { get; protected set; } |
Obsolete: Use Runtime.TimeSinceLastRun instead Gets the amount of in-game time elapsed from the previous run. |
| Runtime { get; protected set; } | Gets runtime information for the running grid program. |
| Storage { get; protected set; } | Allows you to store data between game sessions. |
| Echo { get; protected set; } | Prints out text onto the currently running programmable block's detail info area. |
| IGC { get; } |
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!