Skip to Main Content

BTD_Mod_Helper​.Api​.Commands​.ModCommand


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Commands

ModCommand Class

Defines a command that can be run from within the Mod Helper developer console

public abstract class ModCommand : BTD_Mod_Helper.Api.ModContent

Inheritance System.ObjectModContent  ModCommand

Derived
ExportCommand
ModCommand<T>
OpenCommand
TestCommand

Fields

ModCommand.SubCommands Field

List of Sub-commands that this command has

public readonly Dictionary<string,ModCommand> SubCommands;

Field Value

System.Collections.Generic.Dictionary<System.String,ModCommand>

Properties

ModCommand.Command Property

The string name of this command

public abstract string Command { get; }

Property Value

System.String

ModCommand.Help Property

Short text description of this command

public abstract string Help { get; }

Property Value

System.String

ModCommand.IsAvailable Property

Whether the command is available to users

public virtual bool IsAvailable { get; }

Property Value

System.Boolean

ModCommand.Options Property

Optional arguments for this command

public System.Collections.Generic.IEnumerable<CommandLine.OptionAttribute> Options { get; }

Property Value

System.Collections.Generic.IEnumerable<CommandLine.OptionAttribute>

ModCommand.ParentCommand Property

Other ModCommand that this is nested under, or null if a root command

public virtual BTD_Mod_Helper.Api.Commands.ModCommand ParentCommand { get; }

Property Value

ModCommand

ModCommand.SuggestionLine Property

Line of text that appears as a suggestion

public string SuggestionLine { get; }

Property Value

System.String

ModCommand.Values Property

Positional values for this command

public System.Collections.Generic.IEnumerable<CommandLine.ValueAttribute> Values { get; }

Property Value

System.Collections.Generic.IEnumerable<CommandLine.ValueAttribute>

Methods

ModCommand.CloseConsole() Method

Closes the command console

protected static void CloseConsole();

ModCommand.Execute(string) Method

Runs this command

public abstract bool Execute(ref string resultText);

Parameters

resultText System.String

Returns

System.Boolean
Whether this command successfully executed

ModCommand.ExplainSubcommands(string) Method

Fails the command and displays which subbcommands are available to the user

protected bool ExplainSubcommands(out string resultText);

Parameters

resultText System.String

Returns

System.Boolean

To learn how to download BTD Mod Helper and install mods, click here