Skip to content

Releases: MerlinofMines/EasyCommands

v2.0.0

15 Jan 04:00
6ddee32
Compare
Choose a tag to compare

What's Changed

Added thread management support and a few other requested features. Also updating the versioning strategy going forward to better adhere to semantic versioning principles.

Importantly, the behavior of aggregate conditions has changed to better adhere to vacuous truth principles. Specifically, an aggregate condition over empty list or empty selector will now return true instead of false. any still returns false.

#Prints All are on
if all of "Dont Exist" pistons are on
  print "All are on"
if none of "Dont Exist" pistons are on
  print "None are on"

#Does Not Print
if any of "Dont Exist" pistons are on 
  print "Any are on"

New Features

  • Added "await" command, which can be used to perform async & wait operations.
await
  async runTask1
  async runTask2
  print "Doing something else"
print "Finished with Async Tasks!"
  • Added basic thread management support including the ability to retrieve, rename and terminate threads.
set the current thread name to "My Awesome Thread"
terminate all async threads
  • Added helm, helms keyword support for cockpits

  • Added support for getting the input/output limits for batteries

print "Max Input: " + "My Battery" input limit
print "Max Output: " + "My Battery" output limit

Changed Behavior

  • All/None aggregate conditions now return true for empty lists.

Full Changelog: v1.5.2...v2.0.0

v1.5.2

10 Jul 18:01
27aa267
Compare
Choose a tag to compare

What's Changed

Minor release to fix a bug related to iterating number formatting of large numbers, and a couple small but useful features.

New Features

  • Added support for custom number formatting support, enabling the scripter to change the number formatting of their script to whatever format they desire. Useful if you want to change the # of significant digits, etc. The default number format is "#0.########"
set global NUMBER_FORMAT to "#0.##"
  • Added ambiguous selector word support, enabling some block keywords to apply to either blocks or block groups. This is a quality of life improvement for scripts using landing gear, inventories, wheel suspension & displays where the desired block or group is ambiguous based on the block type. For these ambiguous words, the script will first look for a singular block. If a block with the given name is not found then it will look for a block group.

Bug Fixes

  • Fixed scientific notation being used in the output of large numbers

Changed Behavior

  • "gear" can now refer to either a single block or a block group.
  • "suspension" can now refer to either a single block or block group
  • "cargo, inventory, inventories" can now refer to either a single block or a block group
  • "display, displays, screen, screens, lcd, lcds" can now refer to either a single block or a block group

Full Changelog: v1.5.1...v1.5.2

v1.5.1

02 Jun 02:49
1c5ef06
Compare
Choose a tag to compare

What's Changed

Minor release to fix a bug related to iterating broadcast listeners. Also includes a couple of character saving changes.

Bug Fixes

  • Fixed an issue where the Forget Command and Restarting the script were broken after running the Listen command.

Full Changelog: v1.5.0...v1.5.1

v1.5.0

23 May 02:11
8e7d137
Compare
Choose a tag to compare

Special thanks to @jgersti for some useful refactors and character saving changes.

What's Changed

This release adds multi-word property support, expanding the possible set of properties that blocks can support significantly. The new support has been used to add a few new properties to various blocks including "ready to connect" for connectors & landing gears, "target velocity" to sensors, cameras & turrets, and several properties related to build & damage % for all terminal blocks. This change also relaxes some of the syntax around how block properties are specified, which was needed for multi-word property support.

In addition, this change introduces a new default aggregator for block properties which should hopefully be more intuitive/useful than the previous "SUM" default aggregator.

New Features

  • Added Grid Block Handler with support for basic properties for your block's grid, including the name, the grid being static, and the grid size (large or small).
  • Added "able to connect" property to connectors & landing gears
  • Added Support for Build & Damage properties for all terminal blocks

Changed Behavior

  • "return" will now end a thread (including the main thread) if executed outside of a function call. Previously this was not allowed.
  • Implicit Aggregation no longer uses "sum" as the default. A new default aggregator has been introduced with different behavior.
    • If the selector is empty, the aggregation returns an empty list
    • If the selector only have 1 block, returns the block property directly
    • If the selector has > 1 block and all block property values are numeric, returns the sum of the values (same as current)
    • If the selector has > 1 block and not all block property values are numeric, returns a list of the values.
  • As a result of the new Implicit Aggregation, the "Name" and "Names" properties have been consolidated as there is no longer a need to have separate properties.
    • This leads to much nicer behavior for names, including:
print the names of my doors
set doorNames to the list of my door names
for each doorName in my door names
  print "Door Name: " + doorName
  • "targetVelocity" has been changed to "target velocity" for sensors, cameras and turrets
  • "naturalGravity" has been changed to "natural gravity" for parachutes & cockpits
  • "artificialGravity" has been changed to "artificial gravity" for parachutes & cockpits

Bug Fixes

  • Fixed issue where requesting a specific function to run (from terminal or new message) was not honored after re-parsing
  • Fixed a bug where assigning list indexes to values containing selector names were incorrectly parsed as a block command.
  • Fixed issue where iterating over a list of values would execute once with "0" if the block property had no items

Full Changelog: v1.4.0...v1.5.0

v1.4.0

08 Mar 00:29
Compare
Choose a tag to compare

Special thanks to @jgersti for caching selectors, properties and actions, and for several other improvements and character saving changes.

What's Changed

New Features

  • Heatvent Block Handler
  • Searchlight Block Handler
  • Custom Turret Controller Block Handler
  • Added properties for CustomData and DetailedInfo for all terminal blocks
  • Added support for casting a string to any primitive type using "cast" without supplying a cast type. Useful for casting arbitrary user input when you are expecting a numeric input, for example.
  • Added support for "type" operation to return a variables type.
  • Added support for target options on turrets and custom turret controllers.

Changed Behavior

  • Turret properties have been adjusted. Use "rotation" to control Idle movement, and "target" with boolean support for getting whether the turret has a target or to reset it's target.
  • Block Selectors and Groups are now cached per tick to improve performance of multiple selector lookups in the same tick.
  • Properties and Actions are now cached after the first access to improve subsequent performance for accessing and modifying.

Bug Fixes

  • Double quoted strings are no longer considered as possible variable references
  • Fixed bug with incrementing selector properties not working as expected

Full Changelog: v1.3.1...v1.4.0

v1.3.1

07 Feb 04:20
Compare
Choose a tag to compare

What's Changed

Changed Behavior

  • Changed String Primitive Parsing so that values inside double quotes are not parsed automatically as primitives. So "2" will not be parsed as the number 2. This is technically backwards incompatible but should yield more correct behavior. "2" + 3 is "23", not 5.
  • Joining lists with a string separator now only joins the list values (stripping the keys) and does not add extra quotes.

Bug Fixes

  • Fixed List Index assignment parsing not working when assigning to an expression
  • Fixed bug where joined lists added double quotes around spaced strings even though the values did not contain double quotes.

Other Changes

  • Minor fixes to door and light block handler docs
  • Added missing docs on using vectors to create colors from RGB values
  • Removed incorrect Debug suggestion from Instructions header

Full Changelog: v1.3.0...v1.3.1

v1.3.0

04 Feb 04:22
Compare
Choose a tag to compare

Special thanks to @jgersti for contributions including Variable Vectors support, several character savings and improvements, and several other improvements

What's Changed

New Features

  • Added sign operator, for getting the sign of a given number or vector
  • Variable Vectors. Vectors can now be created from vectors using the syntax a:b:c where a,b,c can be the names of variables (must be numeric).
  • Added "attached" property to Wheel Suspension for getting and setting whether the wheel is attached.
  • Added Dynamic Item Types support, so that non-vanilla items can be fetched from cargo and produced in assemblers.
  • Added support for dynamic function execution. You can now use a variable name as the name of a function and invoke it using call myFunctionName
  • Added natural and artificial gravity properties to cockpits and parachutes
  • Added altitude property for Cockpits and Remote Controls
  • Added support for rounding to a specific number of digits
  • Added Railgun, Cannon and AutoCannon keywords for guns
  • Added item and blueprint keywords for the new Railgun, Cannon and Autocannon Ammo types

Changed Behavior

  • Added missing default boolean property to Displays
  • Added Forget command to stop listening to a given channel (opposite of Listen command)
  • The Power operation (^) now is applied before *, /, %
  • The "Velocity" property of cockpits, remote controls and parachutes now returns a vector instead of just the magnitude
  • The Round operation can now come before or after the given operand. You can also use Round as a BiOperand to round a given number or vector to the specified number of digits.

Bug Fixes

  • Fixed incorrect default boolean properties for Turrets and Warheads
  • Fixed issue where combining lists used references instead of values for other in memory variables
  • Fixed bad messaging with invalid property lookup
  • Fixed incorrect height value in parachutes
  • Fixed broadcast listeners remaining active after the script is re-parsed

Other Changes

  • Added Collections to the Navbar
  • Simplified code for getting block directions
  • Reworked Tokenization
  • Miscellaneous character savings
  • Improved operational tier support
  • Added missing docs around the newline character
  • Added missing docs around collection subtraction

Full Changelog: v1.2.0...v1.3.0

v1.2.0

17 Jan 22:45
214cc0a
Compare
Choose a tag to compare

Special thanks to @jgersti and @msetze01 for contributions including Cast support, ln support, and adding missing tests/documentation.

What's Changed

New Features

  • Added Unary Minus Support
#Before
set inverseValue to -1 * myValue

#Now
set inverseValue to -myValue
  • Added Cryo Chamber Block Type Support
  • Natural Log Support (ln)
  • Split Operation support for splitting a string by a substring, returning a list of the parsed tokens. Can be used to get line separated text from output displays.
  • Join Operation Support for joining a list by a string separator, producing a string after casting all list values to strings.
  • Shuffle Operation Support for shuffling a given list
  • Random Operation Support. Will return a random whole number if given an input number. If given an input list, will return a random item from the list.

Changed Behavior

  • All Blocks now use Enabled instead of Power as the default Boolean property
  • Changed default Boolean property to Enabled for most blocks instead of previous bad defaults
  • Programmable Blocks
    • Added "programmable" block type keyword
    • Added "argument" as a Text property word
    • Running with no argument now uses the default terminal argument instead of ""
  • Gyro Blocks:
    • Directional Overrides now use explicit RPM numeric values, vs a weird % previously which didn't work logically.
    • Added Vector support for Overrides so you can set the overrides using a vector directly
    • Added Boolean support for Overrides so you can turn off/on the overrides
    • Changed Power property to control the Gyro Power instead of enabling/disabling.
  • Gravity Generator Blocks:
    • Added Level property for governing the Field Sizes, similar to Range.
  • Thruster Blocks:
    • Added missing level and output properties for returning the current thruster output, in N.
  • Projector Blocks:
    • Added support for getting and setting the projector offsets
    • Added support for getting and setting the projector rotation
    • Added missing properties for getting/setting if the projector is showing and whether to keep the projection after build completion
  • Cockpits/Remote Controls
    • Added a "Use" property for determining if a given cockpit, remote control or cryo pod is currently in use (occupied and/or being controlled).
    • Fixed Vectors to use Forwards instead of Backwards
    • Fixed Rotational scaling issue where previously it was -9 to 9 instead of -1 to 1.
  • Jump Drive Blocks
    • Added "jump" as a block type keyword
    • Added support for getting the current, min and max jump limits
    • Added support for setting the current jump distance, in m.

Bug Fixes

  • Fixed Wait Command to wait for the correct # of seconds regardless of the Update Frequency
  • Fixed Cast Operations to operate as expected, including Numeric -> Bool to be True if !=0.
  • Fixed text not being returned from the "text" property for display block types

Other Changes

  • Migrated to PackageReferences to make it easier to get the project working in VisualStudio.

Full Changelog: v1.1.0...v1.2.0

1.1.0

03 Jan 15:56
Compare
Choose a tag to compare

What's Changed

New Features

  • Boolean XOR operator ("^", "xor")
  • List Aggregation ("list", "collection") for retrieving a list of values from a given selector's property:
set myRanges to the list of "My Light" ranges
for each lightRange in myRanges
  Print "Light Range: " + lightRange
  • Added "break" and "continue" support for For Each and Conditional commands.
  • Added "return" support for Functions
  • Added "sort" keyword to Sort operation

Changed Behavior

  • Merge Blocks:
    • Default boolean property is now "Enabled". So turn off the "Merge Block" now works as expected and disables the block.
    • Connected property is no longer read-only. When Set, will Enable/Disable based on value. So disconnect the "Merge Block" now works as expected and disables the block
  • Sound Blocks:
    • Fixed bad "Power" boolean default. Now turn off the "Base Speaker" will disable the block instead of stop playing sound. To stop playing sound, use the Media property. turn off the "Base Speaker" sound, or tell the "Base Speaker" to stop playing
    • Updated Media property to accept booleans (play/stop) or Strings (set/get selected song). If no primitive type specified, uses String, so that Print "The Speaker" sound returns the currently selected sound.
    • Added read-only MediaList property ("sounds", "songs", "tracks") to Sound Block, to return the list of available sounds.

Bug Fixes

  • Fixed disconnect the "Merge Block" and similar commands not working as expected
  • Fixed default increment for Volume on Speakers to be 10%, not 100%. increase the "Base Speaker" volume now increases the volume by 10%, not 100%.

Other Changes

  • Added "sound", "play", "playing", "track" as Media property, and condensed "Silence" property to be "Media" off. So now the following work:
turn off the "Trap Sensor" sound
silence the "Base Alarm"
set the "Base Alarm" sound to "Alert 1"
  • Added "sounds", "tracks" as MediaList properties
  • Added "period" to Level property

Full Changelog: v1.0.2...v1.1.0

v1.0.2

28 Dec 18:46
Compare
Choose a tag to compare

What's Changed

New Features

  • Added Reverse Support for all primitive types (reverses strings, lists, etc).
  • Added more variations of wording for applying actions
  • Added detect, detected as Trigger property keywords
  • Added Weight property for Cargo and Ships.
  • Added dampener and enabled properties for Cockpits and Remote Controls
  • Added support for getting Vector/Color components using "myVector.x, myColor.r" syntax.
  • Added a bunch of properties for Display including enabled, font, background, size, image, images, scripts, alignment, padding, interval, ratio.
  • Added support for "Magnets" (work like Landing Gear)

Changed Behavior

  • Air Vents now consider oxygen level as part of whether they are pressurized/depressurized. Also added support for retrieving whether air vent is currently in pressurization or de-pressurization mode.
  • Changed "coords" to Target property instead of position
  • Changed DoorHandler default boolean to Enabled and added Ratio as numeric default
  • Changed "input" and "rollInput" properties of Cockpits/Remote Controls to return a vector when no direction is specified

Bug Fixes

  • Fixed bug with variable actions not being processed correctly

Other Changes

  • Split ParameterProcessors and removed redundant DataFetchers
  • Added several missing tests
  • Minor improvements to reduce unnecessary character usages
  • Added utilities for more efficient creation of KeyValuePairs and Dictionaries
  • Updated Cast methods to use dictionary lookup to save characters

Full Changelog: v1.0.1...v1.0.2