Experimental re-imagining of Pixi with less C#
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.4KB

  1. using System.Reflection;
  2. using IllusionPlugin;
  3. using TechbloxModdingAPI.Utility;
  4. using TechbloxModdingAPI;
  5. namespace NPort
  6. {
  7. public class NPortPlugin : IEnhancedPlugin
  8. {
  9. public override string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name;
  10. // To change the name, change the project's name
  11. public override string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString();
  12. // called when Gamecraft shuts down
  13. public override void OnApplicationQuit()
  14. {
  15. // Shutdown this mod
  16. Logging.LogDebug($"{Name} has shutdown");
  17. // Shutdown the Gamecraft modding API last
  18. Main.Shutdown();
  19. }
  20. // called when Gamecraft starts up
  21. public override void OnApplicationStart()
  22. {
  23. // Initialize the Gamecraft modding API first
  24. Main.Init();
  25. // check out the modding API docs here: https://mod.exmods.org/
  26. // Initialize this mod
  27. Logging.MetaLog($"{Name} has started up");
  28. #if DEBUG
  29. // TEST
  30. Bindings.Robocraft.FactoryRobotListInfo[] items = Bindings.Robocraft.GetFactoryFrontPage();
  31. foreach (var item in items)
  32. {
  33. Logging.MetaLog($"{item.item_name} by {item.added_by_display_name} ({item.item_id})");
  34. }
  35. #endif
  36. }
  37. // unused methods
  38. public override void OnFixedUpdate() { } // called once per physics update
  39. public override void OnUpdate() { } // called once per rendered frame (frame update)
  40. }
  41. }