Space Engineers

Space Engineers

EasyAPI
正在显示第 41 - 50 项,共 58 项条目
< 1  2  3  4  5  6 >
更新于:2015 年 3 月 25 日 上午 1:11

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.

更新于:2015 年 3 月 23 日 下午 10:42

Bug fix

更新于:2015 年 3 月 22 日 下午 6:19

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

更新于:2015 年 3 月 21 日 上午 2:08

Added support for reading pressure from Air Vents.

更新于:2015 年 3 月 20 日 下午 8:24

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

更新于:2015 年 3 月 19 日 下午 9:58

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.

更新于:2015 年 3 月 19 日 上午 2:00

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

更新于:2015 年 3 月 19 日 上午 1:55

Refactor to make it easier to add new filters.

更新于:2015 年 3 月 17 日 下午 5:29

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

更新于:2015 年 3 月 17 日 上午 2:41

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.