-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
In the latest nightly build regions are broken #4684
Comments
Nightly build starting from this PR caused the issue |
Should be fixed by adding String -> Region converter |
i'm not sure if the situation has changed, but a couple years ago registering a |
I'm not sure if I understand how it works, but here's my thoughts. When you're talking about converting string to region, that means that you must have to interpret code like this:
Where the syntax is:
So, the two variables in that expression are I want to say that I think this is bad design. Condition like
But, it would still be a broken design. Overall I think most of region handling in Skript is fundamentally broken, and here's one of the reasons: in WorldGuard, region names are unique only for worlds, not for servers. So you can have region with the same name in both overworld and nether, and they'd be separate entities. Look at this code:
Imagine you have region "test" in overworld and "test" in nether. With code So, the region-getting expression should be There's more I could say about regions, but that would be another issue. I think that instead of fixing this issue directly, it should be fixed by changing the bad design and syntax. |
Testing is important indeed though we've done this before and haven't found any issue yet, the parser had many improvements over the past time so it might have fixed such issue |
RE: @oskarkk (because I'm not quoting that whole message) Adding the converter will not change anything about the syntax (region literals already have the same syntax as strings: |
I know that adding a converter wouldn't change the syntax. I proposed a new expression for region, because that would be very useful, and because then, if I understand correctly, the converter wouldn't be needed. |
Indeed, if we add such an expression and we remove the literal for regions, the converter would no longer be needed. However, it should still go into a new issue. |
Skript/Server Version
Tested on clean Paper 1.18.2 with WorldGuard/Edit and Skript nightly build from https://github.com/SkriptLang/Skript/actions/runs/1952859162
Bug Description
Something must have changed regarding at least
region contains
expression, it just isn't parsed correctly anymore.Expected Behavior
The same as in the latest stable version.
Steps to Reproduce
/sk reload scripts
It won't parse.Errors or Screenshots
Other
I also tried it on a nightly build made 2 months ago (https://github.com/SkriptLang/Skript/actions/runs/1757620182) and it was working.
Agreement
The text was updated successfully, but these errors were encountered: