Skip to content

Version 1.6.0

Compare
Choose a tag to compare
@EliteMasterEric EliteMasterEric released this 02 Aug 00:17
· 99 commits to master since this release

[1.6.0] - 2022-07-28

Not much in the way of new features for end users here, but some refactors resulted in breaking changes so this is labelled as a minor version rather than a bugfix version.

Added

  • Scripted classes now allow functions with up to 8 arguments, up from 4.
  • Added the new ErrorEx and PolymodPrinterEx classes for more detailed and extensible error handling.
    • Added new error message when attempting to call a custom function on a scripted class improperly.
    • Added new error message when attempting to retrieve a custom variable on a scripted class improperly.
    • Added new error message when attempting to assign a custom variable on a scripted class improperly.
  • New static function Polymod.clearScripts() clears all scripted classes and scripted functions. Useful for cleaning up before a script reload.

Changed

  • HScriptable has been split into two interfaces: HScriptable and HScriptedClass.
    • HScriptable is now used only for @:hscript annotations on scripted functions, and HScriptedClass is used for @:hscriptClass annotations to generate scripted classes.
    • These two interfaces are considered mutually exclusive, and only one should be used on a given class.
  • Moved internal HScript classes to an _internal package.

Fixed

  • Refactored HScript-related macros for improved maintainability.
  • Cached Reflect.fields() queries on PolymodScriptedClass proxies to improve performance.
  • Fixed an issue where attempting to annotate @:hscriptClass on a class which utilized variables whose type is a function.
    • This now allows for FlxUIState to be scripted.
  • Fixed an issue where the right-hand side of a variable assignment was being executed twice.
  • Cleanup extraneous compile-time logging.