|
|
@@ -1,14 +1,13 @@
|
|
|
-using UnityEngine;
|
|
|
using GadgetCore.API;
|
|
|
-using UnityEngine.SceneManagement;
|
|
|
using GadgetCore.API.ConfigMenu;
|
|
|
+using ScrapYard.API;
|
|
|
|
|
|
namespace PlatformBlock
|
|
|
{
|
|
|
- [Gadget("PlatformBlock")]
|
|
|
+ [Gadget("PlatformBlock", LoadAfter: new string[] { "ScrapYard" }, Dependencies: new string[] { "ScrapYard" })]
|
|
|
public class PlatformBlock : Gadget<PlatformBlock>
|
|
|
{
|
|
|
- public const string MOD_VERSION = "1.1"; // Set this to the version of your mod.
|
|
|
+ public const string MOD_VERSION = "1.2"; // Set this to the version of your mod.
|
|
|
public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
|
|
|
|
|
|
public override IGadgetConfigMenu GetConfigMenu() { return null; }
|
|
|
@@ -25,15 +24,7 @@ namespace PlatformBlock
|
|
|
|
|
|
Core.itemPlatformId = ItemUtil.CreatePlacablePlatformItem("cPlatform.png", "iPlatform.png", "Platform Block");
|
|
|
|
|
|
- // SceneManager.sceneLoaded += OnSceneLoaded;
|
|
|
- }
|
|
|
-
|
|
|
- internal static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
|
|
- {
|
|
|
- if (scene.buildIndex == 1)
|
|
|
- {
|
|
|
- // GadgetCoreAPI.CreateMarketStand(ItemRegistry.GetItem(Core.itemPlatformId), new Vector2(-138f - 3 * 4, -7.49f), 500);
|
|
|
- }
|
|
|
+ ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(Core.itemPlatformId, 300));
|
|
|
}
|
|
|
}
|
|
|
}
|