2020-05-11 17:10:43 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2022-02-07 19:43:36 -05:00
|
|
|
|
using System.Threading.Tasks;
|
2023-04-04 19:24:13 -04:00
|
|
|
|
using Data.Models;
|
|
|
|
|
using SharedLibraryCore.Commands;
|
2020-05-11 17:10:43 -04:00
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Interfaces
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// defines capabilities of script command factory
|
2020-05-11 17:10:43 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IScriptCommandFactory
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// generate a new script command from parsed source
|
2020-05-11 17:10:43 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">name of command</param>
|
|
|
|
|
/// <param name="alias">alias of command</param>
|
|
|
|
|
/// <param name="description">description of command</param>
|
|
|
|
|
/// <param name="permission">minimum required permission</param>
|
2020-09-28 21:32:53 -04:00
|
|
|
|
/// <param name="isTargetRequired">target required or not</param>
|
2020-05-11 17:10:43 -04:00
|
|
|
|
/// <param name="args">command arguments (name, is required)</param>
|
2023-04-04 19:24:13 -04:00
|
|
|
|
/// <param name="executeAction">action to perform when command is executed</param>
|
2022-02-07 19:43:36 -05:00
|
|
|
|
/// <param name="supportedGames"></param>
|
2020-05-11 17:10:43 -04:00
|
|
|
|
/// <returns></returns>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
IManagerCommand CreateScriptCommand(string name, string alias, string description, string permission,
|
2023-04-04 19:24:13 -04:00
|
|
|
|
bool isTargetRequired, IEnumerable<CommandArgument> args, Func<GameEvent, Task> executeAction,
|
|
|
|
|
IEnumerable<Reference.Game> supportedGames);
|
2020-05-11 17:10:43 -04:00
|
|
|
|
}
|
2022-02-07 19:43:36 -05:00
|
|
|
|
}
|