Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
Dependency Resolver (#12)
Browse files Browse the repository at this point in the history
* Adds functionality for Broken mods folder

Allows the updater to moves mods to and from the Broken mods folder (also made by VRCMelonAssistant)
It will move any mods that are flagged as broken by the Remote API to the Broken folder as long as the local version is not newer then the remote version. (Allows modders to locally test new versions)
Will move any mods that are in the Broken folder to Mods if the remote API says it is Approved and remote version is > local (Allows someone to manually move a mod to the broken folder if not flagged by the API)
Has a MelonPref to disable the moving To/From Broken folder completely

* Update VRCModUpdaterCore.cs

Quick Fix to make sure dir exists and apparently didn't submit version with MelonPref

* Dependency Resolver

Added option to add missing required and optional Dependencies. Will only count those found in the RemoteAPI

Retains previous behavior where if the mod dependency is in the broken folder and version number is the same as RemoteAPI, it will not auto move.

Co-authored-by: Hugo "Slaynash" Flores <hugo.flores@etu.univ-lyon1.fr>
  • Loading branch information
Nirv-git and Slaynash authored Jun 13, 2022
1 parent 34a253c commit a06b7bf
Show file tree
Hide file tree
Showing 2 changed files with 197 additions and 107 deletions.
11 changes: 11 additions & 0 deletions Core/ModDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public class ModDetail
public string downloadUrl;
public string hash;
public int approvalStatus;
public string[] dependencies = new string[0];
public string[] optDependencies = new string[0];

public ModDetail(string name, string version, string filepath)
{
Expand All @@ -16,6 +18,15 @@ public ModDetail(string name, string version, string filepath)
this.filepath = filepath;
}

public ModDetail(string name, string version, string filepath, string[] dependencies, string[] optDependencies)
{
this.name = name;
this.version = version;
this.filepath = filepath;
this.dependencies = dependencies;
this.optDependencies = optDependencies;
}

public ModDetail(string name, string version, string downloadUrl, string hash)
{
this.name = name;
Expand Down
Loading

0 comments on commit a06b7bf

Please sign in to comment.