Space Engineers

Space Engineers

EasyAPI
Showing 51-58 of 58 entries
< 1  2  3  4  5  >
Update: 15 Mar, 2015 @ 5:43am

New, basic, graphical LCD changes. You can plot the various blocks on your ship to an lcd to, for example, to show sensors that are active.

public class Example : EasyAPI { EasyLCD lcd; public void tick() { lcd.clear(); Refresh(); // keep reloading the blocks to get updates lcd.plot(Blocks.SensorsActive(), 0.5, 0.5, 0.75, 's'); lcd.update(); } /*** Constructor ***/ // This is where your starting code goes. You can setup events here that call functions above. public Example(IMyGridTerminalSystem grid) : base(grid) { this.lcd = new EasyLCD(Blocks.Named("BigLCD")); Every(1 * Seconds, tick); } }

Update: 29 Jan, 2015 @ 5:34pm

I fixed an issue with the DebugDumpActions() method where it was only showing the Name of the action, not the Id which is required to use it in the ApplyActions function. It dow dumps the actions in the following format:

Example of how the new weapon shooting actions are dumped:
ShootOnce: Shoot once
Shoot: Shoot On/Off
Shoot_On: Shoot On
Shoot_Off: Shoot Off

So to shoot your missile launchers you would use:
Blocks.OfType("Missile Launcher").ApplyAction("ShootOnce");

Update: 27 Jan, 2015 @ 11:06pm

In this update I added the following methods to the EasyBlocks class. See the documentation guide for more information:

DebugDumpProperties() - Dumps a list of all blocks and their property types and names to the exception area in programming block

DebugDumpActions() - Dumps a list of all blocks and their action names to the exception area in programming block

SetProperty<T>(PropertyName, Value) - Sets the specified property on all blocks in list

GetProperty<T>(PropertyName) - Gets the specified property from first block in list.

Quick example of Set/GetProperty below. It sets the Height of the gravity field to 15, then returns the value to the height variable which is then displayed in the exception area:

Single height = Blocks.Named("Gravity Generator 1").SetProperty<Single>("Height", 15).GetProperty<Single>("Height"); throw new Exception("Height: " + height);

Update: 23 Jan, 2015 @ 8:32pm

Update: 22 Jan, 2015 @ 10:03pm

Added basic inventory query support.

Update: 22 Jan, 2015 @ 2:32am

Update: 22 Jan, 2015 @ 12:53am

Update: 22 Jan, 2015 @ 12:44am