public static void Help(string tag = "") { DevConsole.Log("-- Help --", "green"); string text = string.Empty; CommandBase[] consoleCommands = DevConsole.CommandArray(tag); for (int i = 0; i < consoleCommands.Length; i++) { text += "\n<color=orange>" + consoleCommands[i].Title + "</color>" + DevConsole.GetParameters(consoleCommands[i]) + (consoleCommands[i].Description == null ? string.Empty : " <color=green>// " + consoleCommands[i].Description + "</color>"); } DevConsole.Log(text); DevConsole.Log("\n<color=orange>Note:</color> If the function has no parameters you <color=red> don't</color> need to use the parameter modifier."); DevConsole.Log("<color=orange>Note:</color> You <color=red>don't</color> need to use the trailing parameter modifier either"); DevConsole.Log("You can use constants to replace common parameters (they are case insensitive but require ' ' around them):"); DevConsole.Log("- 'Center' (or 'Centre') is the position of the center/centre of the map."); DevConsole.Log("- 'MousePos' is the position of the mouse"); DevConsole.Log("- 'TimeScale' is the current time scale"); DevConsole.Log("- 'Pi' is 3.141..."); DevConsole.Log("- 'E' is 2.718..."); }
public static void AllTags() { DevConsole.Log("All the tags: ", "green"); DevConsole.Log(string.Join(", ", DevConsole.CommandArray().SelectMany(x => x.Tags).Select(x => x.Trim()).Distinct().ToArray())); }