forked from ShrineFox/AtlusScriptGUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.cs
36 lines (32 loc) · 1.14 KB
/
Config.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
28
29
30
31
32
33
34
35
36
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtlusScriptGUI
{
public class Config
{
public string Game { get; set; } = "Persona 5 Royal (PC/Switch)";
public string Encoding { get; set; } = "P5R_EFIGS";
public string CompilerPath { get; set; } = "./AtlusScriptCompiler.exe";
public bool DarkMode { get; set; } = true;
public bool Hook { get; set; } = true;
public bool Disassemble { get; set; } = false;
public bool Overwrite { get; set; } = false;
public bool SumBits { get; set; } = true;
public bool DeleteHeader { get; set; } = false;
public void SaveJson(Config settings)
{
File.WriteAllText("Config.json", JsonConvert.SerializeObject(settings, Newtonsoft.Json.Formatting.Indented));
}
public Config LoadJson()
{
if (!File.Exists("Config.json"))
return new Config();
return JsonConvert.DeserializeObject<Config>(File.ReadAllText("Config.json"));
}
}
}