NorbiPeti
63295f82c9
Removed old dependencies, including uREPL Added new block IDs Implemented basic command handling to support existing mod commands
37 lines
1,016 B
C#
37 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();
|
|
}
|
|
}
|
|
}
|