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

Use to-be-closed variables to scope WML variables in tag definitions #5536

Merged
merged 7 commits into from
Feb 16, 2021

Conversation

CelticMinstrel
Copy link
Member

With this you no longer have to worry about forgetting to end the variable scope - Lua will do it for you automatically. This is a PR because I've only done a basic smoke test (making sure there are no errors when starting a game; for this test I chose Aethermaw). I didn't confirm that the variable is correctly set and unset, though I have no reason to expect it wouldn't be; I did do some testing to verify how to-be-closed variables work.

@github-actions github-actions bot added the Lua API Issues with the Lua engine and API. label Feb 13, 2021
@CelticMinstrel CelticMinstrel marked this pull request as draft February 13, 2021 19:39
@CelticMinstrel CelticMinstrel marked this pull request as draft February 13, 2021 19:39
@CelticMinstrel CelticMinstrel marked this pull request as ready for review February 13, 2021 20:16
@stevecotton
Copy link
Contributor

I didn't confirm that the variable is correctly set and unset

Please add a WML-based unit test for this.

@github-actions github-actions bot added the Unit Tests Issues involving Wesnoth's unit test suite. label Feb 15, 2021
@CelticMinstrel
Copy link
Member Author

Please add a WML-based unit test for this.

Done.

@CelticMinstrel CelticMinstrel merged commit a0ee38a into master Feb 16, 2021
@CelticMinstrel CelticMinstrel deleted the scoped_vars branch February 16, 2021 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lua API Issues with the Lua engine and API. Unit Tests Issues involving Wesnoth's unit test suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants