Open
Conversation
Contributor
Author
|
I would have also liked to remove There was also an attempt at creating a macro based DSL, but that failed miserably as rusts nice compiler errors turn not so nice very quickly when using macros. Although you could still add a DSL on top of the new It may also make sense to extract the core command infrastructure (so everything except the command definitions) into its own crate, although I am not sure if this would be a good idea. The worldedit stuff could possibly also be extracted, but again, not sure if this makes sense. |
c8836d6 to
d01f43e
Compare
Contributor
Author
Member
|
Thanks for taking on this mammoth of a task |
dfd9477 to
bcc9dc7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR refactors all command related stuff into a new cohesive unified and declarative command system.
Commands are defined using a builder pattern with and a tree structure of
CommandNodes.This provides centralized command registration, better safer argument parsing, autocomplete generation, usage hints and nice error messages.
All command related stuff have been reorganized into core/src/commands/ and generic worldedit stuff into core/src/worldedit/.
The commands are defined in core/src/commands/builtin/.
The "normal" and worldedit commands are not longer split and are now equal citizens.
I also cleaned up some code around core/src/plot/mod.rs
New Features
/help [<command>]commandnot sure which anymoreEDIT: I rediscovered at least the important one I fixed, there was a missing- 1forx,yandzin worldedit::execute::execute_paste)Config.tomland integrates nicely with autocomplete in most part.For now I have marked this as a draft, as I did not have the time to confirm all commands work without any regressions.
The error messages could also still be improved for certain cases. Same goes for some commands while we are at it.
Btw this PR is mutually exclusive with basically every other currently open PRs, so we should probably address them first (And I will have the enjoyment of fixing the endless amounts of merge conflicts that will result from that-).