Skip to content

Releases: jac3km4/redscript

v0.1.11

25 Feb 22:03
Compare
Choose a tag to compare
  • added shorthand function syntax
public class ShorthandTest {
  public func InstanceVal() -> String = ShorthandTest.StaticVal()
  public static func StaticVal() -> String = "stuff"
}
  • fix an issue with forward references of custom classes
  • extend IScriptable implicitly on custom classes

v0.1.10

15 Feb 00:39
Compare
Choose a tag to compare
  • bytecode correctness fixes
  • fix an issue with @replaceMethod not working for some virtual methods

v0.1.9

13 Feb 21:27
Compare
Choose a tag to compare
  • handle game updates gracefully, the compiler will keep a timestamp file (redscript.ts) to ensure it doesn't accidentally overwrite the scripts after a game update
  • write compilation logs to a redscript.log file from scc.exe
  • warn about conflicting method replacements in scripts (will appear in the log file)
  • experimental support for adding fields in classes:
@addField(PlayerPuppet)
let dummy: Int32;
  • if you use the redscript VS Code extension, you'll need to upgrade it for this version

v0.1.8

09 Feb 00:52
Compare
Choose a tag to compare
  • fix FromVariant
  • fix inferred type for this and super

v0.1.7

08 Feb 22:21
Compare
Choose a tag to compare
  • typecheck intrinsic calls (ArrayPush and friends)
  • typecheck if and while conditions to be Bool
  • fix type inference issue with structs

v0.1.6

07 Feb 18:55
Compare
Choose a tag to compare
  • fix an issue with some compile errors causing a panic
  • fix ternary operator codegen
  • make the file-mode dump of the decompiler more complete by saving orphaned definitions to a dedicated file

v0.1.5

06 Feb 14:19
Compare
Choose a tag to compare
  • Fix an issue with @addmethod functions not being in the object scope
  • Fix an issue with some virtual calls not being correctly generated

v0.1.4

06 Feb 14:36
2767495
Compare
Choose a tag to compare
  • experimental support for adding new methods (including overrides) via @addmethod
@addMethod(GameplayQuestSystem)
private func OnAttach() -> Void {
  Log("Inside GameplayQuestSystem OnAttach!!");
}
  • experimental support for super keyword, which can be used to invoke a base method from a method override
  • support for line comments (to complement already existing multi-line comments)
// new comments
/* existing comments */
  • fix several bugs around source maps (causing issues with error messages in some cases)

v0.1.3

06 Feb 14:37
Compare
Choose a tag to compare
  • Added pretty compile errors with source code locations
    unknown
  • The compiler now accepts an -s parameter instead of -i and expects it to be either a script file or a directory with scripts
  • Fixed a switch codegen issue
  • Fixed an issue with some casts (x as y)
  • Added more type-checking (constructor arguments etc.)
  • Global functions are now by default static and public

v0.1.2

31 Jan 00:26
Compare
Choose a tag to compare
  • @insert annotation is now @replaceMethod, update your scripts accordingly
  • resolves Cast and FromVariant overloads from the context they're used in, it now allows you to write
    let x: Int32 = Cast(0.0);
    or
    let newData: VehEntityPlayerStateData = FromVariant(data);
  • adds new type definitions to the constant pool, compiler previously depended on all types already being defined in the pool
  • improves overload resolution errors, for example now you'll see:
Arguments passed to inkCompoundRef::GetWidgetByIndex do not match any of the overloads:
Parameter self: inkCompoundRef does not match provided SingleplayerMenuGameController