From 72754c8d5fe5e5a359166e6cdb3f70e5682e59a0 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Thu, 12 Dec 2019 22:27:55 -0600 Subject: [PATCH] Added some TODOs --- IPA.Loader/Config/Stores/GeneratedStore.cs | 2 +- IPA.Loader/Loader/PluginManager.cs | 2 +- .../PluginInterfaces/BeatSaber/IDisablablePlugin.cs | 10 ---------- IPA.Loader/PluginInterfaces/BeatSaber/IPlugin.cs | 4 +++- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/IPA.Loader/Config/Stores/GeneratedStore.cs b/IPA.Loader/Config/Stores/GeneratedStore.cs index 971f2c1b..dc212a1e 100644 --- a/IPA.Loader/Config/Stores/GeneratedStore.cs +++ b/IPA.Loader/Config/Stores/GeneratedStore.cs @@ -288,7 +288,7 @@ namespace IPA.Config.Stores var nonNullables = attrs.Select(o => o as NonNullableAttribute).NonNull(); name = member.Name; - isNullable = memberType.IsConstructedGenericType + isNullable = memberType.IsConstructedGenericType // TODO: figure out something to support this in .NET 3 && memberType.GetGenericTypeDefinition() == typeof(Nullable<>); allowNull = !nonNullables.Any() && (!memberType.IsValueType || isNullable); diff --git a/IPA.Loader/Loader/PluginManager.cs b/IPA.Loader/Loader/PluginManager.cs index f186e863..89716052 100644 --- a/IPA.Loader/Loader/PluginManager.cs +++ b/IPA.Loader/Loader/PluginManager.cs @@ -153,7 +153,7 @@ namespace IPA.Loader /// the plugin to enable /// whether a restart is needed to activate public static bool EnablePlugin(PluginMetadata plugin) - { + { // TODO: fix some of this behaviour, by adding better support for runtime enable/disable of mods if (plugin == null) return false; if (plugin.IsBare) diff --git a/IPA.Loader/PluginInterfaces/BeatSaber/IDisablablePlugin.cs b/IPA.Loader/PluginInterfaces/BeatSaber/IDisablablePlugin.cs index f74c3b02..c270515c 100644 --- a/IPA.Loader/PluginInterfaces/BeatSaber/IDisablablePlugin.cs +++ b/IPA.Loader/PluginInterfaces/BeatSaber/IDisablablePlugin.cs @@ -5,16 +5,6 @@ /// public interface IDisablablePlugin { - /*/// - /// Called when a plugin is enabled. This is where you should set up Harmony patches and the like. - /// - /// - /// This will be called after Init, and will be called when the plugin loads normally too. - /// When a plugin is disabled at startup, neither this nor Init will be called until it is enabled. - /// - /// Init will only ever be called once. - /// - void OnEnable();*/ /// /// Called when a plugin is disabled at runtime. This should disable things like Harmony patches and unsubscribe diff --git a/IPA.Loader/PluginInterfaces/BeatSaber/IPlugin.cs b/IPA.Loader/PluginInterfaces/BeatSaber/IPlugin.cs index b8ae28b1..7710e512 100644 --- a/IPA.Loader/PluginInterfaces/BeatSaber/IPlugin.cs +++ b/IPA.Loader/PluginInterfaces/BeatSaber/IPlugin.cs @@ -16,7 +16,7 @@ namespace IPA /// Called when a plugin is enabled. This is where you should set up Harmony patches and the like. /// /// - /// This will be called after Init, and will be called when the plugin loads normally too. + /// This will be called after Init, and will be called when the plugin loads normally too. /// When a plugin is disabled at startup, neither this nor Init will be called until it is enabled. /// /// Init will only ever be called once. @@ -28,6 +28,8 @@ namespace IPA /// void OnApplicationQuit(); + // TODO: move more of these out of IPlugin + /// /// Gets invoked on every graphic update. ///