Browse Source

reminder to add bsipa to your dependencies

pull/53/head 4.1.1
Anairkoen Schno 3 years ago
parent
commit
158cc75caa
Signed by: DaNike GPG Key ID: BEFB74D5F3FC4387
5 changed files with 24 additions and 4 deletions
  1. +1
    -1
      IPA.Loader/Config/SelfConfig.cs
  2. +21
    -1
      IPA.Loader/Loader/PluginLoader.cs
  3. +1
    -1
      IPA.Loader/Loader/manifest.json
  4. +1
    -1
      IPA/Program.cs
  5. BIN
      Refs/UnityEngine.CoreModule.Net4.dll

+ 1
- 1
IPA.Loader/Config/SelfConfig.cs View File

@ -68,7 +68,7 @@ namespace IPA.Config
}
internal const string IPAName = "Beat Saber IPA";
internal const string IPAVersion = "4.1.0.0";
internal const string IPAVersion = "4.1.1.0";
// uses Updates.AutoUpdate, Updates.AutoCheckUpdates, YeetMods, Debug.ShowCallSource, Debug.ShowDebug,
// Debug.CondenseModLogs


+ 21
- 1
IPA.Loader/Loader/PluginLoader.cs View File

@ -32,6 +32,8 @@ namespace IPA.Loader
internal partial class PluginLoader
{
internal static PluginMetadata SelfMeta;
internal static Task LoadTask() =>
TaskEx.Run(() =>
{
@ -95,6 +97,7 @@ namespace IPA.Loader
selfMeta.Manifest = JsonConvert.DeserializeObject<PluginManifest>(manifest);
PluginsMetadata.Add(selfMeta);
SelfMeta = selfMeta;
}
catch (Exception e)
{
@ -225,7 +228,7 @@ namespace IPA.Loader
IEnumerable<string> bareManifests = Directory.GetFiles(UnityGame.PluginsPath, "*.json");
bareManifests = bareManifests.Concat(Directory.GetFiles(UnityGame.PluginsPath, "*.manifest"));
foreach (var manifest in bareManifests)
{ // TODO: maybe find a way to allow a bare manifest to specify an associated file
{
try
{
var metadata = new PluginMetadata
@ -641,12 +644,16 @@ namespace IPA.Loader
var disabledLookup = DisabledPlugins.NonNull(m => m.Id).ToDictionary(m => m.Id, m => m.Version);
foreach (var meta in PluginsMetadata)
{
bool ignoreBcNoLoader = true;
var missingDeps = new List<(string id, Range version, bool disabled)>();
foreach (var dep in meta.Manifest.Dependencies)
{
#if DEBUG
Logger.loader.Debug($"Looking for dependency {dep.Key} with version range {dep.Value.Intersect(new SemVer.Range("*.*.*"))}");
#endif
if (dep.Key == SelfMeta.Id)
ignoreBcNoLoader = false;
if (pluginsToLoad.ContainsKey(dep.Key) && dep.Value.IsSatisfied(pluginsToLoad[dep.Key]))
continue;
@ -662,6 +669,19 @@ namespace IPA.Loader
}
}
if (meta.PluginType != null && !meta.IsSelf && !meta.IsBare && ignoreBcNoLoader)
{
ignoredPlugins.Add(meta, new IgnoreReason(Reason.Dependency)
{
ReasonText = "BSIPA Plugin does not reference BSIPA!"
});
for (int i = 0; i < 20; i++)
{
Logger.loader.Warn($"HEY {meta.Id} YOU DEPEND ON BSIPA SO DEPEND ON BSIPA");
}
continue;
}
if (missingDeps.Count == 0)
{
metadata.Add(meta);


+ 1
- 1
IPA.Loader/Loader/manifest.json View File

@ -5,7 +5,7 @@
"#![IPA.Loader.description.md]",
"A mod loader specifically for Beat Saber."
],
"gameVersion": "1.11.0",
"gameVersion": "1.11.1",
"id": "BSIPA",
"name": "Beat Saber IPA",
"version": "4.1.0",


+ 1
- 1
IPA/Program.cs View File

@ -23,7 +23,7 @@ namespace IPA
Unknown
}
public const string FileVersion = "4.1.0.0";
public const string FileVersion = "4.1.1.0";
public static Version Version => Assembly.GetEntryAssembly().GetName().Version;


BIN
Refs/UnityEngine.CoreModule.Net4.dll View File


Loading…
Cancel
Save