mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-29 00:30:49 +12:00
misc cleanup
This commit is contained in:
parent
edfcff1af3
commit
99fa678ea0
|
@ -51,7 +51,7 @@ namespace ModAssistant
|
|||
string separator = String.Empty;
|
||||
for(int i = 0; i < level; i++)
|
||||
{
|
||||
separator = separator + "│ ";
|
||||
separator += "│ ";
|
||||
}
|
||||
return separator;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Microsoft.Win32;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
@ -185,8 +185,10 @@ namespace ModAssistant
|
|||
if (!File.Exists(@vdf)) return null;
|
||||
|
||||
Regex regex = new Regex("\\s\"\\d\"\\s+\"(.+)\"");
|
||||
List<string> SteamPaths = new List<string>();
|
||||
SteamPaths.Add(Path.Combine(SteamInstall, @"steamapps"));
|
||||
List<string> SteamPaths = new List<string>
|
||||
{
|
||||
Path.Combine(SteamInstall, @"steamapps")
|
||||
};
|
||||
|
||||
using (StreamReader reader = new StreamReader(@vdf))
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
@ -105,7 +105,6 @@ namespace ModAssistant.Pages
|
|||
|
||||
public void GetAllMods()
|
||||
{
|
||||
string json = string.Empty;
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Utils.Constants.BeatModsAPIUrl + "mod");
|
||||
request.AutomaticDecompression = DecompressionMethods.GZip;
|
||||
request.UserAgent = "ModAssistant/" + App.Version;
|
||||
|
@ -114,16 +113,22 @@ namespace ModAssistant.Pages
|
|||
using (Stream stream = response.GetResponseStream())
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
{
|
||||
var serializer = new JavaScriptSerializer();
|
||||
serializer.MaxJsonLength = Int32.MaxValue;
|
||||
var serializer = new JavaScriptSerializer
|
||||
{
|
||||
MaxJsonLength = Int32.MaxValue
|
||||
};
|
||||
|
||||
AllModsList = serializer.Deserialize<Mod[]>(reader.ReadToEnd());
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckInstallDir(string directory, List<string> blacklist)
|
||||
{
|
||||
if (!Directory.Exists(Path.Combine(App.BeatSaberInstallDirectory, directory)))
|
||||
return;
|
||||
if (!Directory.Exists(Path.Combine(App.BeatSaberInstallDirectory, directory)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (string file in Directory.GetFileSystemEntries(Path.Combine(App.BeatSaberInstallDirectory, directory)))
|
||||
{
|
||||
if (File.Exists(file) && Path.GetExtension(file) == ".dll" || Path.GetExtension(file) == ".manifest")
|
||||
|
@ -372,12 +377,12 @@ namespace ModAssistant.Pages
|
|||
{
|
||||
foreach (Mod.Dependency dep in dependent.dependencies)
|
||||
{
|
||||
|
||||
|
||||
if (dep.name == mod.name)
|
||||
{
|
||||
dep.Mod = mod;
|
||||
mod.Dependents.Add(dependent);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -616,4 +621,4 @@ namespace ModAssistant.Pages
|
|||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue