forked from Cookies_Github_mirror/AquaDX
[F] Use yaml instead
This commit is contained in:
@@ -60,9 +60,6 @@
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>Libs\System.Xml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Tomlyn, Version=0.17.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Tomlyn.0.17.0\lib\netstandard2.0\Tomlyn.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Analytics.DataPrivacy">
|
||||
<HintPath>Libs\Unity.Analytics.DataPrivacy.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -261,6 +258,9 @@
|
||||
<Reference Include="UnityEngine.XRModule">
|
||||
<HintPath>Libs\UnityEngine.XRModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="YamlDotNet, Version=15.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\YamlDotNet.15.1.1\lib\net47\YamlDotNet.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Config.cs" />
|
||||
@@ -273,7 +273,7 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AquaMai.toml" />
|
||||
<Content Include="AquaMai.yaml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
# ===================================
|
||||
# UX: User Experience Improvements
|
||||
[UX]
|
||||
# Skip the warning screen and logo shown after the POST sequence
|
||||
SkipWarningScreen=1
|
||||
|
||||
7
AquaMai/AquaMai.yaml
Normal file
7
AquaMai/AquaMai.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
# ===================================
|
||||
# UX: User Experience Improvements
|
||||
UX:
|
||||
# Skip the warning screen and logo shown after the POST sequence
|
||||
SkipWarningScreen: true
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using AquaMai.UX;
|
||||
using MelonLoader;
|
||||
using Tomlyn;
|
||||
|
||||
namespace AquaMai
|
||||
{
|
||||
@@ -22,8 +21,9 @@ namespace AquaMai
|
||||
{
|
||||
MelonLogger.Msg("OnApplicationStart");
|
||||
|
||||
// Read AquaMai.toml to load settings
|
||||
AppConfig = Toml.ToModel<Config>("AquaMai.toml");
|
||||
// Read AquaMai.yaml to load settings
|
||||
var yaml = new YamlDotNet.Serialization.Deserializer();
|
||||
AppConfig = yaml.Deserialize<Config>(System.IO.File.ReadAllText("AquaMai.yaml"));
|
||||
|
||||
if (AppConfig.UX.SkipWarningScreen)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Tomlyn" version="0.17.0" targetFramework="net472" />
|
||||
<package id="YamlDotNet" version="15.1.1" targetFramework="net472" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user