Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/EasyCommands/blockHandlers/terminal.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Default Primitive Properties:
* Vector - position

## Controlling Unsupported Block Types
It's impossible to model all Block Types in Space Engineers, since you might have mods installed that add new block types that EasyCommands doesn't know about. Luckily, since almost all blocks inherit from Terminal Block, you can control most of those block's even if they don't have an explicit handler of their own. So, if you find there's a block type (which is a Terminal Block) without a block handler (including 3P block types from mods), you can get some control over it's properties with this Block Handler.
It is impossible to model all Block Types in Space Engineers, since you might have mods installed that add new block types that EasyCommands doesn't know about. Luckily, since almost all blocks inherit from Terminal Block, you can control most of those blocks even if they don't have an explicit handler of their own. So, if you find there's a block type (which is a Terminal Block) without a block handler (including third-party block types from mods), you can get some control over its properties with this Block Handler.

Here's a script to print out properties & values for an unsupported block:

```
set unknownBlock to "Unknown Block"
#Print a set of supported properties for the given blcok
#Print a set of supported properties for the given block
Print $unknownBlock terminal properties

#Print out current property names and values
Expand All @@ -34,7 +34,7 @@ And a similar script for printing out available actions for an unsupported Block

```
set unknownBlock to "Unknown Block"
#Print a set of supported actions for the given blcok
#Print a set of supported actions for the given block
Print $unknownBlock terminal actions

#Print out current property names and values
Expand Down Expand Up @@ -128,7 +128,7 @@ set my data to ""
* Primitive Type: String
* Keywords: ```info, details, detailedinfo```

Returns the detailed info of the block. `DetailedInfo` contains the text on the right hand site of the terminal menu.
Returns the detailed info of the block. `DetailedInfo` contains the text on the right hand side of the terminal menu.

```
set myInfo to "Battery" details split "\n"
Expand Down Expand Up @@ -291,7 +291,7 @@ print "Max Integrity: " + "My Turret" build limit
* Primitive Type: Numeric
* Keywords: ```built ratio, build percentage```

Returns the effective built ratio of the block as a value between 0 and 1 by returning the current build integrity of the block minus any damage the block has taken and then dividing by the blocks maximum integrity. This property is useful for getting the % built of any block.
Returns the effective built ratio of the block as a value between 0 and 1 by returning the current build integrity of the block minus any damage the block has taken and then dividing by the block's maximum integrity. This property is useful for getting the % built of any block.

```
Print "Build Ratio: " + "My Turret" build ratio
Expand Down Expand Up @@ -341,4 +341,4 @@ Returns the effective damage ratio of the block as a value between 0 and 1, whic

```
Print "Damage Ratio: " + "My Turret" damage ratio
```
```
4 changes: 2 additions & 2 deletions docs/EasyCommands/selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extend the "Elevator Pistons" piston group

### Implicit Block Types

It's often the case that the name of the block, or block group, you are selecting contains what kind of block it is. For these cases, it is OK to emit the block type. EasyCommands will infer the block type (and if it is a group) based on the name of the entity.
It's often the case that the name of the block, or block group, you are selecting contains what kind of block it is. For these cases, it is OK to omit the block type. EasyCommands will infer the block type (and if it is a group) based on the name of the entity.
```
#Assume Elevator Pistons is a Block Group of Pistons
extend the "Elevator Pistons"
Expand Down Expand Up @@ -123,7 +123,7 @@ turn on "Base Batteries"[0..2]
turn on "Base Batteries"[0..2, "Extra Battery"]
```

If a supplied index is greater than the number of blocks, or if the selector does not include a block named for the string selecctor, then the selector returns an empty set of blocks to act on.
If a supplied index is greater than the number of blocks, or if the selector does not include a block named for the string selector, then the selector returns an empty set of blocks to act on.

Index Selectors can be used in combination with any other Selector modifier, such as Conditions. I recommend parentheses to make it clear what you intend as the final result.

Expand Down
4 changes: 2 additions & 2 deletions docs/EasyCommands/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Sometimes you might want to create strings that include spaces, double quotes, o
By default, double quoted strings are considered as possible [Selectors](https://spaceengineers.merlinofmines.com/EasyCommands/selectors "Selectors"). The parser should figure out whether you intended it to be a string or a selector, but in some cases you may need to wrap your string.

To wrap double quotes so that they appear in your static string, wrap the entire string with single quotes (').
To wrap single quotes so that they appear in your static stirng, wrap the entire string with tildes (\`).
To wrap single quotes so that they appear in your static string, wrap the entire string with grave accents (\`).


```
Expand Down Expand Up @@ -419,4 +419,4 @@ if any of myList[] > 2
Print "List contains an item > 2"
```

Similarly to Aggregate Block conditions, the "all/none" checks will return true for an empty list and "any" will return false for an empty list.
Similarly to Aggregate Block conditions, the "all/none" checks will return true for an empty list and "any" will return false for an empty list.
Loading