-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
AppConfig.cs
27 lines (22 loc) · 1.22 KB
/
AppConfig.cs
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
namespace CSGO_Offset_Dumper
{
internal class AppConfig
{
private const string ConfigPath = "csgodumperconfig.json";
public static ConfigObj CurrentConfig;
public static void InitConfig()
{
if (!File.Exists(ConfigPath))
File.WriteAllText(ConfigPath, System.Text.Json.JsonSerializer.Serialize(new ConfigObj()));
CurrentConfig = System.Text.Json.JsonSerializer.Deserialize<ConfigObj>(File.ReadAllText(ConfigPath));
}
public static void SaveConfig() => File.WriteAllText(ConfigPath, System.Text.Json.JsonSerializer.Serialize(CurrentConfig));
public class ConfigObj
{
public string ExportNamespace { get; set; } = "kyedumper";
public string FallbackConfigURL { get; set; } = "https://raw.githubusercontent.com/frk1/hazedumper/master/config.json";
//These are the Source classes to include under LocalPlayer, CCSPlayer and all the classes it inherits
public string[] LocalPlayerClasses { get; set; } = new string[] { "CBaseEntity", "CBaseAnimating", "CBaseAnimatingOverlay", "CBaseFlex", "CBaseCombatCharacter", "CBasePlayer", "CCSPlayer" };
}
}
}