Desc: Modified SlashCommandHandler HelpCommand to use CommandInfos as a map, rather than a vector. This helps to alphabetize the commands, for easier location of certain commands. Additionally, pagination was added to display 10 total commands per page when running /help. You can run /help 2 to access page 2, /help 3 to access page 3 etc. I also made it so that it wont display pages that are not available, either due to GMlevel or number of total commands.
Motivation and Context: I was working on testing some script changes and used the /help command, only to be unable to find the commands i was looking for due to them being out of order and in a massive list.
Type of Changes: Changes mad to CommandInfos to be a map, as well as relocating the original code for the help command display into HelpCommand, which helped with some scope issues I was having.
How Has This Been Tested?: Building the server, and trying out the /help command as different GMLevels, as well as testing to ensure it returns Invalid page number. If the page number is too high or the user doesnt have access to said commands.
feat: command organization and pagination
Desc: Modified SlashCommandHandler HelpCommand to use CommandInfos as a map, rather than a vector. This helps to alphabetize the commands, for easier location of certain commands. Additionally, pagination was added to display 10 total commands per page when running
/help
. You can run/help 2
to access page 2,/help 3
to access page 3 etc. I also made it so that it wont display pages that are not available, either due to GMlevel or number of total commands.Motivation and Context: I was working on testing some script changes and used the
/help
command, only to be unable to find the commands i was looking for due to them being out of order and in a massive list.Type of Changes: Changes mad to CommandInfos to be a map, as well as relocating the original code for the help command display into HelpCommand, which helped with some scope issues I was having.
How Has This Been Tested?: Building the server, and trying out the
/help
command as different GMLevels, as well as testing to ensure it returnsInvalid page number.
If the page number is too high or the user doesnt have access to said commands.