Added basic help and quit functions to tools.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using SlatedGameToolkit.Tools.System.Interaction;
|
||||
|
||||
namespace SlatedGameToolkit.Tools.System
|
||||
{
|
||||
public interface IInvocable
|
||||
@@ -12,16 +14,24 @@ namespace SlatedGameToolkit.Tools.System
|
||||
/// <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 getHelp(string arg);
|
||||
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(string[] args);
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user