forked from LavaGang/MelonLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.cs
More file actions
39 lines (32 loc) · 1.27 KB
/
Config.cs
File metadata and controls
39 lines (32 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Collections.Generic;
using System.IO;
using MelonLoader.Preferences;
namespace MelonLoader.Il2CppAssemblyGenerator
{
internal class Config
{
private static string FilePath;
private static MelonPreferences_ReflectiveCategory Category;
internal static AssemblyGeneratorConfiguration Values;
internal static void Initialize()
{
FilePath = Path.Combine(Core.BasePath, "Config.cfg");
Category = MelonPreferences.CreateCategory<AssemblyGeneratorConfiguration>("Il2CppAssemblyGenerator");
Category.SetFilePath(FilePath, printmsg: false);
Category.DestroyFileWatcher();
Values = Category.GetValue<AssemblyGeneratorConfiguration>();
if (!File.Exists(FilePath))
Save();
}
internal static void Save() => Category.SaveToFile(false);
public class AssemblyGeneratorConfiguration
{
public string GameAssemblyHash = null;
public string DeobfuscationRegex = null;
public string UnityVersion = "0.0.0.0";
public string DumperVersion = "0.0.0.0";
public string UnhollowerVersion = "0.0.0.0";
public List<string> OldFiles = new List<string>();
}
}
}