Space Engineers

Space Engineers

EasyAPI
Showing 41-50 of 58 entries
< 1  2  3  4  5  6 >
Update: 25 Mar, 2015 @ 1:11am

New advanced events API which allows an event to be attached to any object! I will be using this advanced api to implement an easy events api later.

See the EasyAPI Documentation guide for a video and example.

Also cleaned up the head of the script by removing the example code. This will make it easier for people to get started on a new script without having to remove the example code. The example code is available in the documentation guide.

Update: 23 Mar, 2015 @ 10:42pm

Bug fix

Update: 22 Mar, 2015 @ 6:19pm

Added support for communication between programming blocks!

There is a new class called EasyMessage which contains the properties:
From - The EasyBlock that sent the message
Subject - The subject of the message
Message - The actual message
Timestamp - the system time in long format when the message was sent.

You can send a message like this:
Blocks.NamedLike("DestinationPBs").SendMessage(ComposeMessage("Subject", "Message"));

Then, on the destination, blocks you can handle the mesages like this:


public class EasyMain : EasyAPI { public void handleMessages() { var messages = GetMessages(); for(int n = 0; n < messages.Count; n++) { EasyMessage message = messages[n]; // do stuff with the message here } } public EasyMain(IMyGridTerminalSystem grid) : base(grid) { Every(100 * Milliseconds, handleMessages); } }

Update: 21 Mar, 2015 @ 2:08am

Added support for reading pressure from Air Vents.

Update: 20 Mar, 2015 @ 8:24pm

Added text plotting function text(x, y, string) to the EasyLCD class in order to get my new PongLCD (Playable pong game) to work!

Update: 19 Mar, 2015 @ 9:58pm

Sorry if someone was already using it but I decided to rename the And function to "Plus" and added a "Minus" function which remove the blocks from the original group.

I also added the operators + and - which do the same thing as the functions.

Thanks to LukeStrike for the suggestions.

Update: 19 Mar, 2015 @ 2:00am

Added group filters:
InGroupsNamed(Name)
InGroupsNotNamed(Name)
InGroupsNamedLike(Name)
InGroupsNotNamedLike(Name)
InGroupsNamedRegex(Pattern)
InGroupsNotNamedRegex(Pattern)

Added Add() filter to combine two sets of blocks:
EasyBlocks SensorsAndLights = Blocks.OfType("Sensor").And(Blocks.InGroupsNamed("Lights"));

Update: 19 Mar, 2015 @ 1:55am

Refactor to make it easier to add new filters.

Update: 17 Mar, 2015 @ 5:29pm

Added new EasyBlocks function called InGroup(name) which allows you to find all blocks in the specified group.

Update: 17 Mar, 2015 @ 2:41am

LCD API Fixes and overhauled the event api to be based on system time and support hundreds of calls per second by using a self-triggering timer block.