using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("NoMusicStopParry")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoMusicStopParry")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e2c92c50-cd9c-4ef4-954c-5511d680c977")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoMusicStopParry;
[BepInPlugin("com.AquaEther.NoMusicStopParry", "NoMusicStopParry", "1.1.0")]
public class NoMusicStopParryPlugin : BaseUnityPlugin
{
[HarmonyPatch(typeof(TimeController), "ParryFlash")]
public static class ParryPatch
{
[HarmonyPrefix]
public static void SetToFalse()
{
timeController.controlPitch = false;
}
[HarmonyPostfix]
public static void SetToTrue()
{
timeController.controlPitch = true;
}
}
private const string MyGUID = "com.AquaEther.NoMusicStopParry";
private const string PluginName = "NoMusicStopParry";
private const string VersionString = "1.1.0";
public static ManualLogSource Log = new ManualLogSource("NoMusicStopParry");
public static GameObject gameController;
public static TimeController timeController;
public void Awake()
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: NoMusicStopParry, VersionString: 1.1.0 is loaded.");
Log = ((BaseUnityPlugin)this).Logger;
SceneManager.sceneLoaded -= OnSceneLoaded;
SceneManager.sceneLoaded += OnSceneLoaded;
Harmony val = new Harmony("com.AquaEther.NoMusicStopParry");
val.PatchAll();
}
public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
if (((Scene)(ref scene)).name != "b3e7f2f8052488a45b35549efb98d902" && ((Scene)(ref scene)).name != "241a6a8caec7a13438a5ee786040de32" && ((Scene)(ref scene)).name != "Bootstrap")
{
gameController = GameObject.Find("GameController");
timeController = gameController.GetComponent<TimeController>();
}
}
}