Space Engineers
EasyAPI
Показані результати 51–58 із 58
< 1  2  3  4  5  >
Оновлено: 15 берез. 2015 о 5:43

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); } }

Оновлено: 29 січ. 2015 о 17:34

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");

Оновлено: 27 січ. 2015 о 23:06

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);

Оновлено: 23 січ. 2015 о 20:32

Оновлено: 22 січ. 2015 о 22:03

Added basic inventory query support.

Оновлено: 22 січ. 2015 о 2:32

Оновлено: 22 січ. 2015 о 0:53

Оновлено: 22 січ. 2015 о 0:44