From b239de7abc59dd1fe435cd3b2048a3a209f3a575 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Sun, 5 Aug 2018 00:28:13 -0500 Subject: [PATCH] Did some more documenting Probably ready for a realase --- IllusionInjector/IllusionInjector.csproj | 1 + IllusionInjector/Updating/ModsaberML/Updater.cs | 1 + IllusionPlugin/BeatSaber/IBeatSaberPlugin.cs | 10 +--------- IllusionPlugin/BeatSaber/ModsaberModInfo.cs | 12 +++++++++++- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/IllusionInjector/IllusionInjector.csproj b/IllusionInjector/IllusionInjector.csproj index d3fe4104..47c790bd 100644 --- a/IllusionInjector/IllusionInjector.csproj +++ b/IllusionInjector/IllusionInjector.csproj @@ -35,6 +35,7 @@ prompt 4 false + true diff --git a/IllusionInjector/Updating/ModsaberML/Updater.cs b/IllusionInjector/Updating/ModsaberML/Updater.cs index f6977e4c..46fb0a09 100644 --- a/IllusionInjector/Updating/ModsaberML/Updater.cs +++ b/IllusionInjector/Updating/ModsaberML/Updater.cs @@ -60,6 +60,7 @@ namespace IllusionInjector.Updating.ModsaberML foreach (var plugin in PluginManager.BSMetas) { var info = plugin.ModsaberInfo; + if (info == null) continue; using (var request = UnityWebRequest.Get(ApiEndpoint.ApiBase + string.Format(ApiEndpoint.GetApprovedEndpoint, info.InternalName))) { diff --git a/IllusionPlugin/BeatSaber/IBeatSaberPlugin.cs b/IllusionPlugin/BeatSaber/IBeatSaberPlugin.cs index af5672aa..a9e2753c 100644 --- a/IllusionPlugin/BeatSaber/IBeatSaberPlugin.cs +++ b/IllusionPlugin/BeatSaber/IBeatSaberPlugin.cs @@ -23,16 +23,8 @@ namespace IllusionPlugin /// string Version { get; } -#if OLD_UPDATER /// - /// The URI to the update script for the plugin. May be . - /// Actually tho this does nothing I just don't want to try to remove it completely - /// - Uri UpdateUri { get; } -#endif - - /// - /// Gets the info for the Modsaber release of this plugin. + /// Gets the info for the Modsaber release of this plugin. Return null if there is no Modsaber release. /// ModsaberModInfo ModInfo { get; } diff --git a/IllusionPlugin/BeatSaber/ModsaberModInfo.cs b/IllusionPlugin/BeatSaber/ModsaberModInfo.cs index 9acb730c..6defe31c 100644 --- a/IllusionPlugin/BeatSaber/ModsaberModInfo.cs +++ b/IllusionPlugin/BeatSaber/ModsaberModInfo.cs @@ -6,9 +6,19 @@ using System.Threading.Tasks; namespace IllusionPlugin.BeatSaber { - public struct ModsaberModInfo + /// + /// A class to provide information about a mod on ModSaber.ML + /// + public class ModsaberModInfo { + /// + /// The name the mod uses on ModSaber as an identifier. + /// public string InternalName { get; set; } + + /// + /// The version of the currently installed mod. Used to compare to the version on ModSaber. + /// public Version CurrentVersion { get; set; } } }