TechbloxModdingAPI/TechbloxModdingAPI/Commands/ExistingCommands.cs
Norbi Peti 63295f82c9 Update to Techblox 2021.09.03.10.36
Removed old dependencies, including uREPL
Added new block IDs
Implemented basic command handling to support existing mod commands
2021-09-07 23:15:03 +02:00

38 lines
1,016 B
C#

using System.Linq;
namespace TechbloxModdingAPI.Commands
{
public static class ExistingCommands
{
public static void Call(string commandName)
{
CustomCommands.Call(commandName);
}
public static void Call<Arg0>(string commandName, Arg0 arg0)
{
CustomCommands.Call(commandName, arg0);
}
public static void Call<Arg0, Arg1>(string commandName, Arg0 arg0, Arg1 arg1)
{
CustomCommands.Call(commandName, arg0, arg1);
}
public static void Call<Arg0, Arg1, Arg2>(string commandName, Arg0 arg0, Arg1 arg1, Arg2 arg2)
{
CustomCommands.Call(commandName, arg0, arg1, arg2);
}
public static bool Exists(string commandName)
{
return CustomCommands.Exists(commandName);
}
public static (string Name, string Description)[] GetCommandNamesAndDescriptions()
{
return CustomCommands.GetAllCommandData().Values.Select(command => (command.Name, command.Description)).ToArray();
}
}
}