-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Create menu if multiple nom matches found #983
Conversation
This change checks the nomination against the map arraylist. If the nomination matches multiple results, those results are then added to a menu to allow the client to select available maps. The maps added to the menu go against the same checks as the normal nomination menu and wont allow nomination of disabled maps. Example image of /nominate jump_b https://i.imgur.com/ZdzB0gk.png I would also like feedback on the idea of registering command "sm_nom" with the same callback as "sm_nominate".
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.
Some general changes, but I really like this
Last thing that could probably use some discussion (aka don't implement it yet), we might want to add a check so player console & server console behavior is unaffected. I think this should only happen when a player executes |
If reply source is console, menus wont be generated and it will attempt to nominate as normal
I went ahead and went against your message and added an implementation to demonstrate what I had in mind for checking source. If reply source is console, menus wont be generated and it will attempt to nominate as normal. |
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.
A few questions
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.
I'm okay with this, but I'd like to wait for another smdev to double check it before a merge
@asherkin can I get your 👀 on this?
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.
🚢
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.
Yikes. I too like the idea but the exploit should be fixed before merging.
Thanks for this! |
This change checks the nomination against the map arraylist. If the nomination matches multiple results, those results are then added to a menu to allow the client to select available maps. The maps added to the menu go against the same checks as the normal nomination menu and wont allow nomination of disabled maps. Example image of /nominate jump_b https://i.imgur.com/ZdzB0gk.png If reply source is console, menus wont be generated and it will attempt to nominate as normal.
This change checks the nomination against the map arraylist. If the nomination matches multiple results, those results are then added to a menu to allow the client to select available maps. The maps added to the menu go against the same checks as the normal nomination menu and wont allow nomination of disabled maps.
There is also a defined MATCHED_INDEXES_MAX of 7, which means there will only be one page of matched maps.Update: Added convar sm_nominate_maxfound.The main reason for this change is to allow for more flexibility of map nominations. In its current state, the plugin only attempts to nominate the very first match.
Example image of /nominate jump_b
Image demonstrating that disabled maps cannot be selected.
Command used: /nominate jump_
I would also like feedback on the idea of registering command "sm_nom" with the same callback as "sm_nominate".