improved help section
This commit is contained in:
@@ -15,7 +15,7 @@ namespace RecrownedAthenaeum.Tools.CommandProcessor
|
||||
|
||||
public override string Help(string argument)
|
||||
{
|
||||
return "Prints this.";
|
||||
return "help [command] [arg]";
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,17 @@ namespace RecrownedAthenaeum.Tools.CommandProcessor
|
||||
if (commandEngine.ContainsCommand(arguments[0]))
|
||||
{
|
||||
ConsoleUtilities.WriteWrappedLine(commandEngine.GetCommand(arguments[0]).Help(null));
|
||||
} else
|
||||
for (int i = 1; i < arguments.Length; i++)
|
||||
{
|
||||
ConsoleUtilities.WriteWrappedLine(commandEngine.GetCommand(arguments[0]).Help(arguments[i]));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException(arguments[0] + " not a command. Type \"help\" for a list of commands.");
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
ConsoleUtilities.WriteWrappedLine("Tools for RecrownedAthenaeum library. Possible commands are as follows:\n");
|
||||
foreach (EngineCommand engineCommand in commandEngine.commands)
|
||||
|
Reference in New Issue
Block a user