ShipDecorations.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using UnityEngine;
  2. using GadgetCore.API;
  3. using UnityEngine.SceneManagement;
  4. using System.Reflection;
  5. using GadgetCore.API.ConfigMenu;
  6. using System;
  7. using ScrapYard.API;
  8. namespace ShipDecorations
  9. {
  10. [Gadget("ShipDecorations", LoadAfter: new string[] { "ScrapYard" }, Dependencies: new string[] { "ScrapYard" })]
  11. public class ShipDecorations : Gadget<ShipDecorations>
  12. {
  13. public const string MOD_VERSION = "1.0"; // Set this to the version of your mod.
  14. public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
  15. public override IGadgetConfigMenu GetConfigMenu() { return null; }
  16. protected override void LoadConfig() { Config.Reset(); Config.Save(); }
  17. public override string GetModDescription()
  18. {
  19. return "A mod that adds some more ship decorations.";
  20. }
  21. protected override void Initialize()
  22. {
  23. Logger.Log("Ship Decorations v" + Info.Mod.Version);
  24. Core.logger = Logger;
  25. var lightsPlatform = new ShopPlatform("Decorations").Register();
  26. lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableDecoItem("cBed.png", "iBed.png", "Bed"), 1000));
  27. lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableDecoItem("cPlant0Plant.png", "iPlant0Plant.png", "Bush Plant"), 1000));
  28. lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableDecoItem("cTree5Plant.png", "iTree5Plant.png", "Tree Plant"), 1000));
  29. lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableDecoItem("cTreantHeadPlant.png", "iTreantHeadPlant.png", "Treant Plant"), 2, 1, ItemRegistry.GetItemIDByRegistryName("ScrapYard:Scrap Trophy")));
  30. lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableSlideDoorItem("cDoor.png", "cDoorOpen.png", "iDoor.png", "Door"), 1000));
  31. }
  32. }
  33. }