-
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
Allow custom checks before allowing a player to protect new areas #74
Allow custom checks before allowing a player to protect new areas #74
Conversation
My local luacheck runs fine with this, I would appreciate a hint on what I am doing wrong... |
I had to manually approve the luacheck run for this PR since you're a first time contributor to this repo. |
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.
This is a very welcome change to allow better mod interoperability.
Provided a few suggestions. Feel free to reject if you think they don't make sense.
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.
Tried to create an area that is too large for a regular player. As expected, it still works.
LGTM. Will merge in a few days unless someone's got objections.
Thanks for that great hint! I hope I did it in the right way now. If not I would appreciate if someone with deeper knowledge would take that over... |
Tested by tampering tha function in
Your implementation works. |
Implements #53, using the return values proposed there.
I removed the hardcoded restrictions in
areas:canPlayerAddArea
and re-registered them with the new api call.This makes it possible to overwrite all conditions for modders and, more importantly, ensures that the error message from the first callback which failed is returned.