-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
Skip -
prefix variable names when saving. (Ephemeral variables)
#7495
base: dev/feature
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to add tests for this using JUnit?
} | ||
Skript.warning("The character '" + token + "' is reserved at the start of variable names, " + | ||
"and may be restricted in future versions"); | ||
if (first == '-') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the label for this loop still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not.
It was never an illegal token, it was reserved specifically in order to make it an official memory variable prefix, which is what this PR is doing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, on second thought, shouldn't we catch this earlier in the process, like at saveVariableChange? Then it won't even be added to the save queue or serialized.
OHHHHH... ok I totally misread the PR then. The description was a bit vague and I didn't really know what it was doing. I see it now, thank you for the clarification. |
Description
Variables starting with
-
will be skipped during saving.There is no longer a warning about using
-
, since this is now the default behaviour.Target Minecraft Versions: any
Requirements: none
Related Issues: #6454