From 88ad197c04cc40a215a2a866830a65bb938b1816 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Wed, 10 Apr 2019 19:28:52 -0500 Subject: [PATCH] Added config option to disable auto-updates --- IPA.Loader/Config/SelfConfig.cs | 2 ++ IPA.Loader/Loader/PluginComponent.cs | 7 ++++--- IPA.Loader/Updating/BeatMods/Updater.cs | 5 +---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IPA.Loader/Config/SelfConfig.cs b/IPA.Loader/Config/SelfConfig.cs index f15c5ec2..c28f8c96 100644 --- a/IPA.Loader/Config/SelfConfig.cs +++ b/IPA.Loader/Config/SelfConfig.cs @@ -39,6 +39,8 @@ namespace IPA.Config public bool ApplyAntiYeet = false; + public bool AutoUpdate = true; + public class DebugObject { public bool ShowCallSource = false; diff --git a/IPA.Loader/Loader/PluginComponent.cs b/IPA.Loader/Loader/PluginComponent.cs index b2b4553c..53f8250a 100644 --- a/IPA.Loader/Loader/PluginComponent.cs +++ b/IPA.Loader/Loader/PluginComponent.cs @@ -1,4 +1,5 @@ -using IPA.Loader.Composite; +using IPA.Config; +using IPA.Loader.Composite; using System.Diagnostics.CodeAnalysis; using UnityEngine; using UnityEngine.SceneManagement; @@ -27,8 +28,8 @@ namespace IPA.Loader ipaPlugins = new CompositeIPAPlugin(PluginManager.Plugins); #pragma warning restore 618 - /* kill this for now, until theres a new system */ - gameObject.AddComponent(); + if (SelfConfig.SelfConfigRef.Value.AutoUpdate) + gameObject.AddComponent(); bsPlugins.OnApplicationStart(); ipaPlugins.OnApplicationStart(); diff --git a/IPA.Loader/Updating/BeatMods/Updater.cs b/IPA.Loader/Updating/BeatMods/Updater.cs index 22db2bfb..0c0fb787 100644 --- a/IPA.Loader/Updating/BeatMods/Updater.cs +++ b/IPA.Loader/Updating/BeatMods/Updater.cs @@ -46,10 +46,7 @@ namespace IPA.Updating.BeatMods } } - private void CheckForUpdates() - { - StartCoroutine(CheckForUpdatesCoroutine()); - } + public void CheckForUpdates() => StartCoroutine(CheckForUpdatesCoroutine()); private class DependencyObject {