Example #1
0
        public void OnApplicationStart()
        {
            Log("Creating Harmony Instance");
            harmony = HarmonyInstance.Create("com.kyle1413.BeatSaber.GamePlayModifiersPlus");
            ApplyPatches();
            CheckPlugins();

            if (twitchPluginInstalled)
            {
                InitStreamCore();
            }
            ChatConfig.Load();
            ReadPrefs();
            //Delete old config if it exists
            if (File.Exists(Path.Combine(Environment.CurrentDirectory, "UserData\\GamePlayModifiersPlusChatSettings.ini")))
            {
                try
                {
                    File.Delete(Path.Combine(Environment.CurrentDirectory, "UserData\\GamePlayModifiersPlusChatSettings.ini"));
                }
                catch (Exception ex)
                {
                    Log("Could not Delete Old Config: " + ex);
                }
            }
            cooldowns = new Cooldowns();
            defColorA.SetColor(new Color(1f, 0, 0));
            defColorB.SetColor(new Color(0, .706f, 1));

            if (ModPrefs.GetInt("GameplayModifiersPlus", "GameRumbleSetting", -1, false) != -1)
            {
                Log("Rumble Key Exists");
                setDefaultRumble = true;
            }
        }
        public void ReadPrefs()
        {
            Config.Load();
            //  GMPUI.gnomeOnMiss = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.gnomeOnMiss", false, true);
            //   GMPUI.superHot = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.superHot", false, true);
            //   GMPUI.bulletTime = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.bulletTime", false, true);
            //  GMPUI.chatIntegration = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.chatIntegration", false, true);
            //    GMPUI.swapSabers = ModPrefs.GetBool("GameplayModifiersPlus", "swapSabers", false, true);
            GMPUI.chatDelta = ModPrefs.GetBool("GameplayModifiersPlus", "chatDelta", false, true);

            Config.Save();
        }
Example #3
0
 public void ReadPrefs()
 {
     ChatConfig.Load();
     //  GMPUI.gnomeOnMiss = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.gnomeOnMiss", false, true);
     //   GMPUI.superHot = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.superHot", false, true);
     //   GMPUI.bulletTime = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.bulletTime", false, true);
     //  GMPUI.chatIntegration = ModPrefs.GetBool("GameplayModifiersPlus", "GMPUI.chatIntegration", false, true);
     //    GMPUI.swapSabers = ModPrefs.GetBool("GameplayModifiersPlus", "swapSabers", false, true);
     GMPUI.disableFireworks = ModPrefs.GetBool("GameplayModifiersPlus", "DisableFireworks", false, false);
     GMPUI.chatDelta        = ModPrefs.GetBool("GameplayModifiersPlus", "chatDelta", false, true);
     GMPUI.allowMulti       = ModPrefs.GetBool("GameplayModifiersPlus", "allowMulti", false, true);
     GMPUI.disableRipple    = ModPrefs.GetBool("GameplayModifiersPlus", "DisableRipple", false, false);
 }