ShipDecorations.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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" }, LoadPriority: 100)]
  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. ShopPlatform.DefaultWalls.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateWallItem("cWindowScrapWall.png", "iWindowScrapWall.png", "Scrap Wall Window"), 10));
  32. ShopPlatform.DefaultWalls.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateWallItem("cWindowScrapWall.png", "iWindowScrapWall.png", "Strong Wall"), 10));
  33. ShopPlatform.DefaultWalls.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateWallItem("cHavyWindow.png", "iHavyWindow.png", "Strong Window"), 10));
  34. ShopPlatform.DefaultWalls.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateWallItem("cHiveWall.png", "iHiveWall.png", "Hive Wall"), 10));
  35. ShopPlatform.DefaultWalls.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateWallItem("cHiveWindow.png", "iHiveWindow.png", "Hive Window"), 10));
  36. lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableStairsItemL("cStairs.png", "iStairs.png", "Stairs"), 10));
  37. lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableStairsItemR("cStairsR.png", "iStairsR.png", "Stairs Right"), 10));
  38. }
  39. }
  40. }