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 {