37 lines
1.6 KiB
C#

using SlatedGameToolkit.Tools.System.Interaction;
namespace SlatedGameToolkit.Tools.System
{
public interface IInvocable
{
/// <summary>
/// Invokers are the strings that should invoke this command.
/// This should not conflict with any other commands invokers.
/// </summary>
/// <returns>A list of the strings that will invoke this invokable.</returns>
string[] GetInvokers();
/// <summary>
/// The help should be a description of how to properly use this invokable.
/// If an argument is specified, the help should cater to that specific argument.
/// Information in the description does not need to be repeated.
/// </summary>
/// <param name="arg">An argument this invokable should describe. May be null, to which should return a string that describes this invokable in general.</param>
/// <returns></returns>
string getUsage(string arg);
/// <summary>
/// Executes this invokable.
/// </summary>
/// <param name="interactable">The interactable object.</param>
/// <param name="args">The arguments that followed the invokable.</param>
/// <returns>True if the invokable was successful, false otherwise to display a generic help message.</returns>
bool Execute(IInteractable interactable, string[] args);
/// <summary>
/// Gets a simple description of the command.
/// </summary>
/// <returns>Return a string with a short description of the command.</returns>
string getDescription();
}
}