A stable modding interface between Techblox and mods https://mod.exmods.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1016B

  1. using System.Linq;
  2. namespace TechbloxModdingAPI.Commands
  3. {
  4. public static class ExistingCommands
  5. {
  6. public static void Call(string commandName)
  7. {
  8. CustomCommands.Call(commandName);
  9. }
  10. public static void Call<Arg0>(string commandName, Arg0 arg0)
  11. {
  12. CustomCommands.Call(commandName, arg0);
  13. }
  14. public static void Call<Arg0, Arg1>(string commandName, Arg0 arg0, Arg1 arg1)
  15. {
  16. CustomCommands.Call(commandName, arg0, arg1);
  17. }
  18. public static void Call<Arg0, Arg1, Arg2>(string commandName, Arg0 arg0, Arg1 arg1, Arg2 arg2)
  19. {
  20. CustomCommands.Call(commandName, arg0, arg1, arg2);
  21. }
  22. public static bool Exists(string commandName)
  23. {
  24. return CustomCommands.Exists(commandName);
  25. }
  26. public static (string Name, string Description)[] GetCommandNamesAndDescriptions()
  27. {
  28. return CustomCommands.GetAllCommandData().Values.Select(command => (command.Name, command.Description)).ToArray();
  29. }
  30. }
  31. }