mirror of https://github.com/hykilpikonna/AquaDX
[M] Migrate to tomlet
parent
e6e4782d51
commit
8152b9ab0d
|
@ -5,6 +5,10 @@
|
||||||
<assemblyIdentity name="mscorlib" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
<assemblyIdentity name="mscorlib" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
|
@ -60,6 +60,9 @@
|
||||||
<Reference Include="System.Xml">
|
<Reference Include="System.Xml">
|
||||||
<HintPath>Libs\System.Xml.dll</HintPath>
|
<HintPath>Libs\System.Xml.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Tomlet">
|
||||||
|
<HintPath>Libs\Tomlet.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Unity.Analytics.DataPrivacy">
|
<Reference Include="Unity.Analytics.DataPrivacy">
|
||||||
<HintPath>Libs\Unity.Analytics.DataPrivacy.dll</HintPath>
|
<HintPath>Libs\Unity.Analytics.DataPrivacy.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -258,9 +261,6 @@
|
||||||
<Reference Include="UnityEngine.XRModule">
|
<Reference Include="UnityEngine.XRModule">
|
||||||
<HintPath>Libs\UnityEngine.XRModule.dll</HintPath>
|
<HintPath>Libs\UnityEngine.XRModule.dll</HintPath>
|
||||||
</Reference>
|
</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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Config.cs" />
|
<Compile Include="Config.cs" />
|
||||||
|
@ -271,10 +271,9 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="AquaMai.yaml" />
|
<Content Include="AquaMai.toml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
# ===================================
|
||||||
|
# UX: User Experience Improvements
|
||||||
|
[UX]
|
||||||
|
# Skip the warning screen and logo shown after the POST sequence
|
||||||
|
SkipWarningScreen=true
|
||||||
|
# Single player: Show 1P only, at the center of the screen
|
||||||
|
SinglePlayer=true
|
|
@ -1,8 +0,0 @@
|
||||||
|
|
||||||
# ===================================
|
|
||||||
# UX: User Experience Improvements
|
|
||||||
UX:
|
|
||||||
# Skip the warning screen and logo shown after the POST sequence
|
|
||||||
SkipWarningScreen: true
|
|
||||||
# Single player: Show 1P only, at the center of the screen
|
|
||||||
SinglePlayer: true
|
|
Binary file not shown.
|
@ -1,5 +1,6 @@
|
||||||
using AquaMai.UX;
|
using AquaMai.UX;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
|
using Tomlet;
|
||||||
|
|
||||||
namespace AquaMai
|
namespace AquaMai
|
||||||
{
|
{
|
||||||
|
@ -21,9 +22,15 @@ namespace AquaMai
|
||||||
{
|
{
|
||||||
MelonLogger.Msg("Loading mod settings...");
|
MelonLogger.Msg("Loading mod settings...");
|
||||||
|
|
||||||
// Read AquaMai.yaml to load settings
|
// Check if AquaMai.toml exists
|
||||||
var yaml = new YamlDotNet.Serialization.Deserializer();
|
if (!System.IO.File.Exists("AquaMai.toml"))
|
||||||
AppConfig = yaml.Deserialize<Config>(System.IO.File.ReadAllText("AquaMai.yaml"));
|
{
|
||||||
|
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)
|
if (AppConfig.UX.SkipWarningScreen)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="YamlDotNet" version="15.1.1" targetFramework="net472" />
|
|
||||||
</packages>
|
|
Loading…
Reference in New Issue