Skip to content

Conversation

@palmmc
Copy link
Contributor

@palmmc palmmc commented Sep 7, 2025

Currently, soft enum validation was entirely broken. In some cases, you could enter any string value and it would validate it. In others, it would match a completely incorrect overload.

This fix will correctly validate overloads server-side, since we currently can't rely on client-side validation.

This is not an alternative to real enum support. Client will still not be able to differentiate between two enum overloads due to both using the string symbol, which renders overload feedback incorrect when typing a command using multiple enums. See my issue for more information.

@palmmc
Copy link
Contributor Author

palmmc commented Sep 7, 2025

Added bad alias support to this PR because it's better than no alias support, and this is a missing feature currently as well. All I've done is register the command under each alias, if there is a better way to do this we can improve this for this pr or in the future.

In my changes I stopped returning error messages for the player, but that's fixed now. my bad
@palmmc
Copy link
Contributor Author

palmmc commented Sep 7, 2025

I'm done making changes now (unless changes are requested to merge the pr).

EDIT: nevermind, guess I'm not, lol

Enums now have to validate to run an overload. This makes overloads a little more strict, but several times less prone to error. Also, better logging. :)
@AnyBananaGAME
Copy link
Contributor

@PMK744 I think this should get merged since no more edits are being pushed?

@conmaster2112
Copy link
Contributor

Is it up to date? Is it working properly? We want to make sure it doesn't break other stuff if possible.

Also please run linter before commits but looks good i guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants