Create menu if multiple nom matches found#983
Merged
asherkin merged 9 commits intoalliedmodders:masterfrom Aug 1, 2019
JoinedSenses:patch-1
Merged
Create menu if multiple nom matches found#983asherkin merged 9 commits intoalliedmodders:masterfrom JoinedSenses:patch-1
asherkin merged 9 commits intoalliedmodders:masterfrom
JoinedSenses:patch-1
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".
Headline
requested changes
Apr 23, 2019
Member
Headline
left a comment
There was a problem hiding this comment.
Some general changes, but I really like this
Member
|
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
Contributor
Author
|
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. |
KyleSanderson
requested changes
Jul 5, 2019
Member
KyleSanderson
left a comment
There was a problem hiding this comment.
Yikes. I too like the idea but the exploit should be fixed before merging.
Member
|
Thanks for this! |
BotoX
pushed a commit
to BotoX/sourcemod
that referenced
this pull request
Sep 10, 2019
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 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 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".