|
|
@@ -1,15 +1,16 @@
|
|
|
using GadgetCore.API;
|
|
|
using GadgetCore.API.ConfigMenu;
|
|
|
+using ScrapYard.API;
|
|
|
using System;
|
|
|
using UnityEngine;
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
namespace CombatChipChest
|
|
|
{
|
|
|
- [Gadget("CombatChipChest")]
|
|
|
+ [Gadget("CombatChipChest", LoadAfter: new string[] { "ScrapYard" }, Dependencies: new string[] { "ScrapYard" })]
|
|
|
public class CombatChipChest : Gadget<CombatChipChest>
|
|
|
{
|
|
|
- public const string MOD_VERSION = "1.0"; // Set this to the version of your mod.
|
|
|
+ public const string MOD_VERSION = "1.1"; // 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; }
|
|
|
@@ -40,21 +41,8 @@ namespace CombatChipChest
|
|
|
Core.menu = new MenuInfo(MenuType.CHIP, menuCombat, tile);
|
|
|
Core.menu.Register("Combat Chip Chest");
|
|
|
|
|
|
- // SceneManager.sceneLoaded += OnSceneLoaded;
|
|
|
- }
|
|
|
+ ShopPlatform.DefaultObjects.AddShopPlatformEntry(new ShopPlatformEntry(Core.itemCombatChipChestId, 1000));
|
|
|
|
|
|
- internal static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
|
|
- {
|
|
|
- if (scene.buildIndex == 1)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- // GameObject obj = GadgetCoreAPI.CreateMarketStand(ItemRegistry.GetItem(Core.itemCombatChipChestId), new Vector2(-138f - 1 * 4, -7.49f), 100);
|
|
|
- // // NetworkView network = obj.GetComponent<NetworkView>();
|
|
|
- // // network.viewID = Network.AllocateViewID();
|
|
|
- }
|
|
|
- catch (Exception e) { Core.logger.LogConsole(e.Message); }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|