tested and fixed new help structure
This commit is contained in:
parent
960bf76802
commit
e137796b46
@ -138,7 +138,7 @@ namespace RecrownedAthenaeum.Tools.CommandProcessor
|
||||
/// <returns>The string for the help.</returns>
|
||||
public string Help(string argument = null)
|
||||
{
|
||||
if (arguments != null)
|
||||
if (argument != null && arguments != null)
|
||||
{
|
||||
if (Validate(argument))
|
||||
{
|
||||
@ -149,25 +149,31 @@ namespace RecrownedAthenaeum.Tools.CommandProcessor
|
||||
return "The argument " + argument + " does not exist. Type \"help " + invokeStrings[0] + "\" (or any of its aliases) for a list of arguments.";
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder helpBuilder = new StringBuilder();
|
||||
helpBuilder.Append(help);
|
||||
helpBuilder.AppendLine();
|
||||
helpBuilder.Append("Possible arguments are: ");
|
||||
for (int i = 0; i < arguments.Length; i++)
|
||||
else
|
||||
{
|
||||
helpBuilder.Append(arguments[i].invokeString);
|
||||
if (i + 2 > arguments.Length)
|
||||
StringBuilder helpBuilder = new StringBuilder();
|
||||
helpBuilder.Append(help);
|
||||
if (arguments != null)
|
||||
{
|
||||
helpBuilder.Append(", and ");
|
||||
}
|
||||
else
|
||||
{
|
||||
helpBuilder.Append(", ");
|
||||
helpBuilder.AppendLine();
|
||||
helpBuilder.Append("Possible arguments are: ");
|
||||
for (int i = 0; i < arguments.Length; i++)
|
||||
{
|
||||
helpBuilder.Append(arguments[i].invokeString);
|
||||
if (i == arguments.Length - 2)
|
||||
{
|
||||
helpBuilder.Append(", and ");
|
||||
}
|
||||
else if (i < arguments.Length - 2)
|
||||
{
|
||||
helpBuilder.Append(", ");
|
||||
}
|
||||
}
|
||||
helpBuilder.Append('.');
|
||||
}
|
||||
return helpBuilder.ToString();
|
||||
}
|
||||
helpBuilder.Append('.');
|
||||
return helpBuilder.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace RecrownedAthenaeum.Tools.TextureAtlasTools
|
||||
new EngineCommandArgument("-dau", "Disables automatically upscaling the texture."),
|
||||
};
|
||||
|
||||
help = "Packs a given directory composed of png and jpg files into an atlas. Can also add 9patch properties. Runnig without arguments triggers interactive mode.";
|
||||
help = "Packs a given directory composed of png and jpg files into an atlas. Can also add 9patch properties. Running without arguments triggers interactive mode.";
|
||||
}
|
||||
|
||||
public override void Run(string[] arguments)
|
||||
|
Loading…
Reference in New Issue
Block a user