Browse Source

[CombatChipChest] [2.0.2.1] Config Disable Cleanup

Zariteis 4 years ago
parent
commit
8df1404ba3
2 changed files with 7 additions and 9 deletions
  1. 5 9
      CombatChipChest/CombatChipChest.cs
  2. 2 0
      CombatChipChest/CombatChipStore.cs

+ 5 - 9
CombatChipChest/CombatChipChest.cs

@@ -1,9 +1,8 @@
-using UnityEngine;
 using GadgetCore.API;
-using System.Collections;
+using GadgetCore.API.ConfigMenu;
 using System;
+using UnityEngine;
 using UnityEngine.SceneManagement;
-using System.Reflection;
 
 namespace CombatChipChest
 {
@@ -13,11 +12,8 @@ namespace CombatChipChest
     public const string MOD_VERSION = "1.0"; // 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.
 
-    protected override void LoadConfig()
-    {
-      Config.Reset();
-      Config.Save();
-    }
+    public override IGadgetConfigMenu GetConfigMenu() { return null; }
+    protected override void LoadConfig() { Config.Reset(); Config.Save(); }
 
     public override string GetModDescription()
     {
@@ -44,7 +40,7 @@ namespace CombatChipChest
       Core.menu = new MenuInfo(MenuType.CHIP, menuCombat, tile);
       Core.menu.Register("Combat Chip Chest");
 
-      SceneManager.sceneLoaded += OnSceneLoaded;
+      // SceneManager.sceneLoaded += OnSceneLoaded;
     }
 
     internal static void OnSceneLoaded(Scene scene, LoadSceneMode mode)

+ 2 - 0
CombatChipChest/CombatChipStore.cs

@@ -41,10 +41,12 @@ namespace CombatChipChest
         m_ChipIDs[i] = PreviewLabs.PlayerPrefs.GetInt("customChipsStore:" + _id + ":" + i, 0);
       }
     }
+
     public void UpdateLatestUI()
     {
       UpdateUI(lastUsed);
     }
+
     private GameObject lastUsed;
     public void UpdateUI(GameObject menu)
     {