Made Commands Mod Bound - #3341
Conversation
Commands are now bound by mod instead of hardcoded Added a mod feature type called commands, moved the commands into mods/cubyz/commands/***.zig Commands in source are now have their full names ex: "undo" is "cubyz:worldedit/undo" but in game and permissions it's still "undo" also my first pull request yay
Update .gitignore
| .idea/editor.xml | ||
| /.idea |
There was a problem hiding this comment.
why exacly are we modifying the gitignore this is not getting past quantum
There was a problem hiding this comment.
Funny. Reviewed at the same time 😆
There was a problem hiding this comment.
i was infact 2 minutes faster grrr
There was a problem hiding this comment.
Because it's redundant. There are infinitely many fancy configuration files you can add to gitignore and we don't want this file to grow past what's specific to the project. Instead you can add global gitignore file in your home directory and handle your favourite code editor this way.
There was a problem hiding this comment.
you have a horrible sense of humor
There was a problem hiding this comment.
Well, it's GitHub, not a comedy club. Although sometimes I'm having doubts.
There was a problem hiding this comment.
well if what i said sounds too much of a question to you then i guess thats on me
There was a problem hiding this comment.
Mh I might have misred the original comment. My bad.
There was a problem hiding this comment.
please don't edit the .gitignore file.
|
sorry guys ts my first pull request |
This reverts commit 932db35.
|
oh got it |
You have to edit your own pull request. |
Wunka
left a comment
There was a problem hiding this comment.
There is something with the "overwritting" where I am not sure if we want to do this that way (see #3125 for why) but else it looks good.
For your understanding this PR will now be but on the project board where Quantum can see and review it, so its now a waiting game.
|
I see a functional issue with this - addon load order is arbitrary, so one has no control over which command they get. Even if the order was defined, eg. alphabetical, still we lack a tool to define which command we get. So overwriting commands should not be a thing. |
|
oh yeah that's a good idea, i'll try to do that |
Commands now have aliases in server Each command gets assigned a base alias if it is unique For example /cubyz:dog shortens to just /dog If there are 2 contradicting aliases they do not get assigned: ex /cubyz:dog and /newmod:dog both lack an alias Users can set custom aliases using the command /cubyz:alias <shortname> <actualname>, theese are seperate from auto aliases and have priority over them Also updated usages to use command's full name Things not done: Persistance Parsing actual usage into usage to get dynamic usage text same thing with args
|
Btw still not ready cause |

Commands are now bound by mod instead of hardcoded
Added a mod feature type called commands, moved the commands into mods/cubyz/commands/***.zig
Commands in source are now have their full names ex: "undo" is "cubyz:worldedit/undo" but in game and permissions it's still "undo"
Latter commands with the same names will overwrite the former since you call them based on their bare names, overwrition will log a warning. ex. "cubyz:tp" will overwrite "amod:tp"
sorry for dupe