Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AngelScript compiler: Update to latest version, add support for OpenSR-only scripts. #10

Open
3 of 5 tasks
DaloLorn opened this issue Apr 13, 2022 · 1 comment
Open
3 of 5 tasks
Labels
enhancement New feature or request

Comments

@DaloLorn
Copy link
Member

DaloLorn commented Apr 13, 2022

The benefits of updating to a newer version of AngelScript should be self-explanatory. However, in order to allow mods to be backwards-compatible with older builds of the game, we must allow them to block scripts out as "OpenSR-only". This will require some careful exploitation of loopholes in the current compiler.

This is a pretty big improvement, but it's possibly also a pretty big undertaking. It's not currently blocking any other tasks, so there's no pressing need for us to rush in with a "do it right now drop whatever else you're doing" mindset.

@DaloLorn DaloLorn added the enhancement New feature or request label Apr 13, 2022
DaloLorn added a commit that referenced this issue Jan 27, 2025
…ime to actually remove the version specs if we found a match.
DaloLorn referenced this issue Jan 28, 2025
I'm not sure I *like* it yet, but I think it'll *work*, at least, and my C++ knowledge is too limited to make it any better.
DaloLorn added a commit that referenced this issue Jan 28, 2025
DaloLorn added a commit that referenced this issue Jan 28, 2025
DaloLorn added a commit that referenced this issue Jan 28, 2025
DaloLorn added a commit that referenced this issue Jan 29, 2025
…ggestions.


(The `while` loops are definitely a good idea, but the more pertinent question here is whether the rest of the code will work or crash spectacularly... we shall see!)
DaloLorn added a commit that referenced this issue Jan 31, 2025
DaloLorn added a commit that referenced this issue Jan 31, 2025
DaloLorn added a commit that referenced this issue Jan 31, 2025
DaloLorn added a commit that referenced this issue Jan 31, 2025
DaloLorn added a commit to OpenSRProject/OpenStarRuler-Modpack that referenced this issue Feb 3, 2025
…penStarRuler#10.

- New OpenSR builds will no longer erroneously display the Check for Updates button on the main menu.
- Added extra logging for the OpenSR language level, to assist in mod debugging.
@DaloLorn
Copy link
Member Author

DaloLorn commented Feb 3, 2025

Just for reference:

  • Changed the versioned block delimiters from ///, /**, and **/ to //%, /*%, and %*/. (Thanks to @kb-1000 for sanity-checking me here!)
  • While the original issue recognized the value in defining a minimum language level for a versioned block, it did not make any reference to the maximum language level. The full syntax is now //%min-max, where min and max are optional integers separated by a hyphen. (If you're not specifying max, the hyphen is optional too.)
  • Versioned blocks are disabled by default as a performance optimization. Only files starting with the line //#opensr will support versioned blocks. (See OpenSRProject/OpenStarRuler-Modpack@6dd083f for an example.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant