Skip to content

Conversation

@JoinedSenses
Copy link
Contributor

@JoinedSenses JoinedSenses commented Apr 23, 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. 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
Nom Menu

Image demonstrating that disabled maps cannot be selected.
Command used: /nominate jump_
Nom Menu2

I would also like feedback on the idea of registering command "sm_nom" with the same callback as "sm_nominate".

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".
@JoinedSenses JoinedSenses changed the title Create menu is multiple nom matches found Create menu if multiple nom matches found Apr 23, 2019
Copy link
Member

@Headline Headline left a 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

@Headline
Copy link
Member

Headline commented Apr 23, 2019

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 !nominate <incomplete map name> in chat.

If reply source is console, menus wont be generated and it will attempt to nominate as normal
@JoinedSenses
Copy link
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.

@Headline Headline added the Feature Request user requested feature label May 19, 2019
Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions

Copy link
Member

@Headline Headline left a 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?

Copy link
Member

@asherkin asherkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Copy link
Member

@KyleSanderson KyleSanderson left a 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.

@Headline Headline requested a review from KyleSanderson August 1, 2019 02:50
@asherkin asherkin merged commit b8fd7db into alliedmodders:master Aug 1, 2019
@asherkin
Copy link
Member

asherkin commented Aug 1, 2019

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Request user requested feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants