From dbc49655f23d4cdf793ba3ca185c107b6bc53ee2 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Fri, 17 Apr 2020 01:03:34 -0500 Subject: [PATCH] PluginMetadata now forwards to the manifest for appropriate properties --- IPA.Loader/Loader/PluginMetadata.cs | 27 +++++++++----------------- IPA.Loader/Loader/description.md | 30 ++++++++++++++--------------- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/IPA.Loader/Loader/PluginMetadata.cs b/IPA.Loader/Loader/PluginMetadata.cs index 05ef64d1..22e83805 100644 --- a/IPA.Loader/Loader/PluginMetadata.cs +++ b/IPA.Loader/Loader/PluginMetadata.cs @@ -35,31 +35,31 @@ namespace IPA.Loader /// The human readable name of the plugin. /// /// the name of the plugin - public string Name { get; internal set; } + public string Name => manifest.Name; /// /// The BeatMods ID of the plugin, or null if it doesn't have one. /// /// the updater ID of the plugin - public string Id { get; internal set; } + public string Id => manifest.Id; /// /// The name of the author that wrote this plugin. /// /// the name of the plugin's author - public string Author { get; private set; } + public string Author => manifest.Author; /// /// The description of this plugin. /// /// the description of the plugin - public string Description { get; private set; } + public string Description => manifest.Description; /// /// The version of the plugin. /// /// the version of the plugin - public Version Version { get; internal set; } + public Version Version => manifest.Version; /// /// The file the plugin was loaded from. @@ -86,24 +86,24 @@ namespace IPA.Loader /// The name of the resource in the plugin assembly containing the plugin's icon. /// /// the name of the plugin's icon - public string IconName { get; private set; } + public string IconName => manifest.IconPath; /// /// A link to this plugin's home page, if any. /// /// the of the plugin's home page - public Uri PluginHomeLink { get; private set; } + public Uri PluginHomeLink => manifest.Links?.ProjectHome; /// /// A link to this plugin's source code, if avaliable. /// /// the of the plugin's source code - public Uri PluginSourceLink { get; private set; } + public Uri PluginSourceLink => manifest.Links?.ProjectSource; /// /// A link to a donate page for the author of this plugin, if avaliable. /// /// the of the author's donate page - public Uri DonateLink { get; private set; } + public Uri DonateLink => manifest.Links?.Donate; internal bool IsSelf; @@ -124,15 +124,6 @@ namespace IPA.Loader set { manifest = value; - Name = value.Name; - Version = value.Version; - Id = value.Id; - Description = value.Description; - Author = value.Author; - IconName = value.IconPath; - PluginHomeLink = value.Links?.ProjectHome; - PluginSourceLink = value.Links?.ProjectSource; - DonateLink = value.Links?.Donate; AssociatedFiles = value.Files .Select(f => Path.Combine(UnityGame.InstallPath, f)) .Select(p => new FileInfo(p)).ToList(); diff --git a/IPA.Loader/Loader/description.md b/IPA.Loader/Loader/description.md index 851899eb..1dedc776 100644 --- a/IPA.Loader/Loader/description.md +++ b/IPA.Loader/Loader/description.md @@ -1,16 +1,16 @@ -BSIPA -===== - -BSIPA is a mod loader based off of [Illusion Plugin Architecture](https://github.com/russianGecko/IPA-Reloaded), designed for Beat Saber. -While it retains backwards compatability, the recommended interface has been completely redesigned for a more consistent and stable installation. - -Taking some inspiration from mod injectors like [BepInEx](https://github.com/BepInEx/BepInEx), it uses a fork of [Unity Doorstop](https://github.com/NeighTools/UnityDoorstop) -to actually inject itself into the game. - -*** - -The particular method of injection that BSIPA uses lets its user experience be far nicer than most others, not requiring a repatch for every game update. - -With updating the game being seamless, it also makes sense to make updating the mods themselves seamless. BSIPA's internal updater will automatically ask [BeatMods](https://beatmods.com/) -for newer versions of your installed mods. Of course, this is configurable either in the config at `UserData\Beat Saber IPA.json` or with the Mod List, which lets you control the process +BSIPA +===== + +BSIPA is a mod loader based off of [Illusion Plugin Architecture](https://github.com/russianGecko/IPA-Reloaded), designed for Beat Saber. +While it retains backwards compatability, the recommended interface has been completely redesigned for a more consistent and stable installation. + +Taking some inspiration from mod injectors like [BepInEx](https://github.com/BepInEx/BepInEx), it uses a fork of [Unity Doorstop](https://github.com/NeighTools/UnityDoorstop) +to actually inject itself into the game. + +**** + +The particular method of injection that BSIPA uses lets its user experience be far nicer than most others, not requiring a repatch for every game update. + +With updating the game being seamless, it also makes sense to make updating the mods themselves seamless. BSIPA's internal updater will automatically ask [BeatMods](https://beatmods.com/) +for newer versions of your installed mods. Of course, this is configurable either in the config at `UserData\Beat Saber IPA.json` or with the Mod List, which lets you control the process to a greater extend than even the configs. \ No newline at end of file