Skip to content

v2.4.2

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Feb 04:01

This is the compiler for Yarn Spinner. If you want to use Yarn Spinner in a Unity game, please see the releases page for Yarn Spinner for Unity!

Yarn Spinner is made possible by your generous patronage. Please consider supporting Yarn Spinner's development by becoming a patron!

Added

  • Standard library functions (e.g. random, round_places, dice) have been moved from Yarn Spinner for Unity to the core Yarn Spinner library.
  • Added a format function to the standard library.
    • This method works identically to the C# string.Format, but currently only accepts one parameter.
    • format("{0}", 123) will return the string "123".
    • format("${0:F2}", 0.451) will return the string "$0.45".
    • For more information on string formatting, see the .NET documentation on numeric formatting strings.

Changed

  • Updated the schema for .ysls.json files:
    • Commands may no longer specify a return type.
    • Functions must now specify a return type.
    • Changed the definition of 'types' to be an enum of "string", "number", "bool", or "any".
      • Enums in JSON schema are type sensitive, so a warning will be issued for types that have capital letters. To fix these warnings, change your type names in your .ysls.json file to be lowercase. (These warnings have no impact on your Yarn script editing experience or runtime behaviour.)
  • Empty nodes will no longer be included in the compiled output.
    • A warning diagnostic will be generated for each empty node.
  • Fixed a bug where self-referencing inferred value set statements (e.g. <<set $a = $a + 1>>, where $a is not explicitly declared) would crash the compiler.
  • The language server no longer truncates XML documentation comments when it reaches a nested XML node.
  • Updated dependency versions:
    • Google.Protobuf: Moved from 3.15.0 to 3.25.2.
    • System.Text.Json: Moved from 7.0.2 to 8.0.1.
    • Microsoft.Extensions.FileSystemGlobbing: Moved from 7.0.0 to 8.0.0