mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-14 09:17:27 +08:00
[M] Migrate to tomlet
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using AquaMai.UX;
|
||||
using MelonLoader;
|
||||
using Tomlet;
|
||||
|
||||
namespace AquaMai
|
||||
{
|
||||
@@ -21,9 +22,15 @@ namespace AquaMai
|
||||
{
|
||||
MelonLogger.Msg("Loading mod settings...");
|
||||
|
||||
// Read AquaMai.yaml to load settings
|
||||
var yaml = new YamlDotNet.Serialization.Deserializer();
|
||||
AppConfig = yaml.Deserialize<Config>(System.IO.File.ReadAllText("AquaMai.yaml"));
|
||||
// Check if AquaMai.toml exists
|
||||
if (!System.IO.File.Exists("AquaMai.toml"))
|
||||
{
|
||||
MelonLogger.Error("AquaMai.toml not found! Please create it.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Read AquaMai.toml to load settings
|
||||
AppConfig = TomletMain.To<Config>(System.IO.File.ReadAllText("AquaMai.toml"));
|
||||
|
||||
if (AppConfig.UX.SkipWarningScreen)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user