diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-08 21:18:15 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-08 21:18:15 -0500 |
commit | bdb7b04b3edecdf7dfa665d8b5a50a1bbff62699 (patch) | |
tree | 7249d86910ce37a93a82db8322fade5465445dc4 /src/SMAPI/Framework/Commands | |
parent | 04c6733adae9ce568aefb5d9dee6101097e994c5 (diff) | |
parent | df25368300e1254bc6eb2a1c7aa371bfeb289dff (diff) | |
download | SMAPI-bdb7b04b3edecdf7dfa665d8b5a50a1bbff62699.tar.gz SMAPI-bdb7b04b3edecdf7dfa665d8b5a50a1bbff62699.tar.bz2 SMAPI-bdb7b04b3edecdf7dfa665d8b5a50a1bbff62699.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Commands')
-rw-r--r-- | src/SMAPI/Framework/Commands/HelpCommand.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Commands/HelpCommand.cs b/src/SMAPI/Framework/Commands/HelpCommand.cs index b8730a00..baf3116e 100644 --- a/src/SMAPI/Framework/Commands/HelpCommand.cs +++ b/src/SMAPI/Framework/Commands/HelpCommand.cs @@ -41,13 +41,26 @@ namespace StardewModdingAPI.Framework.Commands { Command result = this.CommandManager.Get(args[0]); if (result == null) - monitor.Log("There's no command with that name.", LogLevel.Error); + monitor.Log("There's no command with that name. Type 'help' by itself for more info.", LogLevel.Error); else monitor.Log($"{result.Name}: {result.Documentation}{(result.Mod != null ? $"\n(Added by {result.Mod.DisplayName}.)" : "")}", LogLevel.Info); } else { - string message = "The following commands are registered:\n"; + string message = + "\n\n" + + "Need help with a SMAPI or mod issue?\n" + + "------------------------------------\n" + + "See https://smapi.io/help for the best places to ask.\n\n\n" + + "How commands work\n" + + "-----------------\n" + + "Just enter a command directly to run it, just like you did for this help command. Commands may take optional arguments\n" + + "which change what they do; for example, type 'help help' to see help about the help command. When playing in split-screen\n" + + "mode, you can add screen=X to send the command to a specific screen instance.\n\n\n" + + "Valid commands\n" + + "--------------\n" + + "The following commands are registered. For more info about a command, type 'help command_name'.\n\n"; + IGrouping<string, string>[] groups = (from command in this.CommandManager.GetAll() orderby command.Mod?.DisplayName, command.Name group command.Name by command.Mod?.DisplayName).ToArray(); foreach (var group in groups) { @@ -55,7 +68,6 @@ namespace StardewModdingAPI.Framework.Commands string[] commandNames = group.ToArray(); message += $"{modName}:\n {string.Join("\n ", commandNames)}\n\n"; } - message += "For more information about a command, type 'help command_name'."; monitor.Log(message, LogLevel.Info); } |