Space Engineers

Space Engineers

EasyAPI
Showing 1-10 of 58 entries
< 1  2  3  4  5  6 >
Update: 6 Nov, 2018 @ 6:18pm

Fixed compile error in latest version.

Update: 26 Jan, 2018 @ 1:07am

Fixed most of the problems so it works in the new version of SE.

Update: 4 Nov, 2016 @ 10:45pm

Fixed compiler warnings.

Update: 31 Oct, 2016 @ 6:56pm

Merged pull request from github to fix issue where it was broken after the last update.

Update: 11 Jun, 2016 @ 4:53pm

Make EasyBlocks.Blocks public so it is easier to exend.

Update: 14 May, 2016 @ 9:09am

Added SetFloatValue(string property, float value) function to easyblocks and easyblock classes.

Update: 26 Mar, 2016 @ 1:00pm

Fixed bug that caused an error about accessing an invalid index in a string.

Update: 18 Mar, 2016 @ 5:34pm

New optional parameter added to AddEvent function which changes when events are triggered. The parameter is called onChange, and when set to true it makes the event only get triggered when the condition goes from false to true.

Update: 17 Mar, 2016 @ 5:38pm

Added "AddEvent" method to EasyBlock and EasyBlocks classes.

Example of use to trigger event when door opens/closes:

public class Example : EasyAPI { public Example(IMyGridTerminalSystem grid, IMyProgrammableBlock me, Action<string> echo, TimeSpan elapsedTime) : base(grid, me, echo, elapsedTime) { Blocks.OfTypeLike("Door").AddEvent( delegate(EasyBlock block) { return block.Open(); }, doorOpened ); } public bool doorOpened(EasyBlock door) { // Do something when door is opened door.AddEvent( delegate(EasyBlock block) { return !block.Open(); }, doorClosed ); return false; } public bool doorClosed(EasyBlock door) { // Do something when door is closed door.AddEvent( delegate(EasyBlock block) { return block.Open(); }, doorOpened ); return false; } }

Update: 17 Mar, 2016 @ 4:42pm

Plus and Minus operators and functions now support single blocks (EasyBlock) and not just block sets (EasyBlocks)