addin option to get BS Folder from Steam

This commit is contained in:
Theenoro
2022-05-14 20:43:22 +02:00
parent 75528cc99a
commit a2f01c6100
8 changed files with 134 additions and 24 deletions

View File

@@ -0,0 +1,42 @@
using Gameloop.Vdf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeatSaber_Versions.controller.helper
{
internal class getNormalBeatSaberFolder
{
public static String getBSFolder()
{
String f = @"C:\Program Files (x86)\Steam\steamapps\libraryfolders.vdf";
if (File.Exists(f))
{
dynamic steam = VdfConvert.Deserialize(File.ReadAllText(f));
dynamic libs = steam.Value;
foreach (dynamic lib in libs)
{
Console.Write(lib);
foreach(dynamic opt in lib)
{
Console.Write(opt);
}
dynamic games = lib.Value[lib.Value.Count-1];
foreach(dynamic game in games)
{
Console.Write(game);
}
}
}
return "";
}
}
}