-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Global variable and default value for resource names #3363
Conversation
A global variable named resourceName that always contains the name of the given resource.
Adds a default value to the getResourceName function, if no resource is defined, it handles the current resource, like other similar functions.
@TracerDS |
You could also format it to use ArgumentParser, but I think it would be best for a separate PR somewhere in the future |
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.
lgtm
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.
Good job
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.
If you still want to merge these changes, please use ArgumentParser.
A small refactor wouldnt be so bad here
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.
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.
LGTM 👌
Bump 😈 |
This reverts commit cfe8b1e.
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.
OK LGTM
Enough code reviews and approvals have been submitted, thanks! |
This reverts commit cd88950. The changes in the commit primarily broke map editor and other resources.
Description
This pull request creates a global variable named
resourceName
, which always contains the name of the current resource, and sets the current resource as the default value to the functiongetResourceName
, so if it is not defined as an argument, it is based on that, like in case of other similar functions. Closes #2927.Example