PlatformBlock.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  1. using GadgetCore.API;
  2. using GadgetCore.API.ConfigMenu;
  3. using ScrapYard.API;
  4. namespace PlatformBlock
  5. {
  6. [Gadget("PlatformBlock", LoadAfter: new string[] { "ScrapYard" }, Dependencies: new string[] { "ScrapYard" })]
  7. public class PlatformBlock : Gadget<PlatformBlock>
  8. {
  9. public const string MOD_VERSION = "1.2"; // Set this to the version of your mod.
  10. public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
  11. public override IGadgetConfigMenu GetConfigMenu() { return null; }
  12. public override string GetModDescription()
  13. {
  14. return "A mod that adds a platform block for your ship.";
  15. }
  16. protected override void Initialize()
  17. {
  18. Logger.Log("Platform Block v" + Info.Mod.Version);
  19. Core.logger = Logger;
  20. Core.itemPlatformId = ItemUtil.CreatePlacablePlatformItem("cPlatform.png", "iPlatform.png", "Platform Block");
  21. ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(Core.itemPlatformId, 300));
  22. }
  23. }
  24. }