mirror of https://github.com/hykilpikonna/AquaDX
[+] Add cheat config
parent
de12ec6548
commit
ccb3f7ef34
|
@ -263,7 +263,9 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Cheat\TicketUnlock.cs" />
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="Fix\FixCharaCrash.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="UX\SinglePlayer.cs" />
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
|
||||
# ===================================
|
||||
# Cheat: You control the buttons you press
|
||||
[Cheat]
|
||||
# Unlock normally event-only tickets
|
||||
TicketUnlock=true
|
||||
|
||||
# ===================================
|
||||
# UX: User Experience Improvements
|
||||
[UX]
|
||||
|
|
|
@ -6,6 +6,12 @@ namespace AquaMai
|
|||
public class Config
|
||||
{
|
||||
public UXConfig UX { get; set; }
|
||||
public CheatConfig Cheat { get; set; }
|
||||
|
||||
public class CheatConfig
|
||||
{
|
||||
public bool TicketUnlock { get; set; }
|
||||
}
|
||||
|
||||
public class UXConfig
|
||||
{
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
using AquaMai.UX;
|
||||
using System;
|
||||
using AquaMai.Cheat;
|
||||
using AquaMai.Fix;
|
||||
using AquaMai.UX;
|
||||
using MelonLoader;
|
||||
using Tomlet;
|
||||
|
||||
|
@ -18,6 +21,12 @@ namespace AquaMai
|
|||
{
|
||||
public static Config AppConfig { get; private set; }
|
||||
|
||||
private void Patch(Type type)
|
||||
{
|
||||
MelonLogger.Msg($"> Patching {type}");
|
||||
HarmonyLib.Harmony.CreateAndPatchAll(type);
|
||||
}
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
MelonLogger.Msg("Loading mod settings...");
|
||||
|
@ -33,16 +42,17 @@ namespace AquaMai
|
|||
AppConfig = TomletMain.To<Config>(System.IO.File.ReadAllText("AquaMai.toml"));
|
||||
|
||||
if (AppConfig.UX.SkipWarningScreen)
|
||||
{
|
||||
MelonLogger.Msg("> Patching SkipWarningScreen");
|
||||
HarmonyLib.Harmony.CreateAndPatchAll(typeof(SkipWarningScreen));
|
||||
}
|
||||
Patch(typeof(SkipWarningScreen));
|
||||
|
||||
if (AppConfig.UX.SinglePlayer)
|
||||
{
|
||||
MelonLogger.Msg("> Patching SinglePlayer");
|
||||
HarmonyLib.Harmony.CreateAndPatchAll(typeof(SinglePlayer));
|
||||
}
|
||||
Patch(typeof(SinglePlayer));
|
||||
|
||||
if (AppConfig.Cheat.TicketUnlock)
|
||||
Patch(typeof(TicketUnlock));
|
||||
|
||||
// Fixes that does not have side effects
|
||||
// These don't need to be configurable
|
||||
Patch(typeof(FixCharaCrash));
|
||||
|
||||
MelonLogger.Msg("Loaded!");
|
||||
}
|
||||
|
|
|
@ -2,10 +2,12 @@ using System;
|
|||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AquaMai {
|
||||
namespace AquaMai.UX
|
||||
{
|
||||
// Hides the 2p (right hand side) UI.
|
||||
// Note: this is not my original work. I simply interpreted the code and rewrote it as a mod.
|
||||
public class SinglePlayer {
|
||||
public class SinglePlayer
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(Main.GameMain), "LateInitialize", new Type[] { typeof(MonoBehaviour), typeof(Transform), typeof(Transform) })]
|
||||
public static bool LateInitialize(MonoBehaviour gameMainObject, ref Transform left, ref Transform right)
|
||||
|
|
Loading…
Reference in New Issue