[+] Add option

This commit is contained in:
Azalea
2024-02-07 03:53:13 -05:00
parent aa4fe50eeb
commit aa5f4fb986
5 changed files with 14 additions and 4 deletions

View File

@@ -266,8 +266,8 @@
<Compile Include="Config.cs" /> <Compile Include="Config.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Main.cs" /> <Compile Include="Main.cs" />
<Compile Include="UX\SinglePlayer.cs" />
<Compile Include="UX\SkipWarningScreen.cs" /> <Compile Include="UX\SkipWarningScreen.cs" />
<Compile Include="SinglePlayer.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />

View File

@@ -4,4 +4,5 @@
UX: UX:
# Skip the warning screen and logo shown after the POST sequence # Skip the warning screen and logo shown after the POST sequence
SkipWarningScreen: true SkipWarningScreen: true
# Single player: Show 1P only, at the center of the screen
SinglePlayer: true

View File

@@ -10,6 +10,7 @@ namespace AquaMai
public class UXConfig public class UXConfig
{ {
public bool SkipWarningScreen { get; set; } public bool SkipWarningScreen { get; set; }
public bool SinglePlayer { get; set; }
} }
} }
} }

View File

@@ -19,7 +19,7 @@ namespace AquaMai
public override void OnInitializeMelon() public override void OnInitializeMelon()
{ {
MelonLogger.Msg("OnApplicationStart"); MelonLogger.Msg("Loading mod settings...");
// Read AquaMai.yaml to load settings // Read AquaMai.yaml to load settings
var yaml = new YamlDotNet.Serialization.Deserializer(); var yaml = new YamlDotNet.Serialization.Deserializer();
@@ -27,9 +27,17 @@ namespace AquaMai
if (AppConfig.UX.SkipWarningScreen) if (AppConfig.UX.SkipWarningScreen)
{ {
MelonLogger.Msg("Patching CutsceneSkipping"); MelonLogger.Msg("> Patching CutsceneSkipping");
HarmonyLib.Harmony.CreateAndPatchAll(typeof(SkipWarningScreen)); HarmonyLib.Harmony.CreateAndPatchAll(typeof(SkipWarningScreen));
} }
if (AppConfig.UX.SinglePlayer)
{
MelonLogger.Msg("> Patching SinglePlayer");
HarmonyLib.Harmony.CreateAndPatchAll(typeof(SinglePlayer));
}
MelonLogger.Msg("Loaded!");
} }
} }
} }