-
Notifications
You must be signed in to change notification settings - Fork 52
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 smallest area at given position #79
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.
Large protected area, small open area: Digging inside is possible.
Large open area, small protected area: Digging inside is prohibited.
Works as intended. I'll merge this PR in a few days unless there are objections.
This was a premature PR on my part. Probably better to revert this one until we come up with a way to convert existing areas automatically. Some players are confused with the new paradigm. |
@SwissalpS In this case it could be changed to a setting - preferably disabled for existing worlds and enabled by default for new ones. |
the method |
suggested setting name: use_smallest_area_precedence |
This restores the behaviour to before #79.
When checking for permission to interact, currently the smallest id takes precedence in a situation where areas enclose other areas. This makes it complicated to set up private areas within faction areas and vice versa. Same applies for open areas within a bigger private area.
When multiple areas have the same volume, players seem to agree that the most recently protected area should also take precedence.
Since we can't guarantee that the largest id is the most recent, we still use that info as we have no other way to determine age.
In this PR the smallest area is determined and protection checks applied to that one.
Example usage: mt-mods/xp_redo#74