using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LCSoundTool;
using LethalThings;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MaxwellPatch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MaxwellPatch")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("E5A9D456-B06D-4FBC-A40E-190441538DF6")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MaxwellPatch;
[HarmonyPatch(typeof(Dingus))]
public class MaxwellAiPatch
{
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void DingusPatch(ref AudioSource ___musicAudio, ref AudioSource ___musicAudioFar)
{
___musicAudio.clip = MaxwellPatchBase.NewSfx;
___musicAudio.volume = 0.5f;
___musicAudioFar.clip = MaxwellPatchBase.NewSfxFar;
___musicAudioFar.volume = 0.5f;
}
}
[BepInPlugin("AriDev.MaxwellPatch", "Maxwell Theme", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class MaxwellPatchBase : BaseUnityPlugin
{
private const string ModGuid = "AriDev.MaxwellPatch";
private readonly Harmony _harmony = new Harmony("AriDev.MaxwellPatch");
private static MaxwellPatchBase _instance;
internal static AudioClip NewSfx;
internal static AudioClip NewSfxFar;
private void Awake()
{
if ((Object)(object)_instance == (Object)null)
{
_instance = this;
}
((BaseUnityPlugin)this).Logger.Log((LogLevel)16, (object)"Starting Maxwell Patch");
NewSfx = SoundTool.GetAudioClip(Path.GetDirectoryName(((BaseUnityPlugin)_instance).Info.Location), "maxwell.wav");
NewSfxFar = SoundTool.GetAudioClip(Path.GetDirectoryName(((BaseUnityPlugin)_instance).Info.Location), "maxwell2.wav");
_harmony.PatchAll(typeof(MaxwellAiPatch));
_harmony.PatchAll(typeof(MaxwellPatchBase));
((BaseUnityPlugin)this).Logger.Log((LogLevel)16, (object)"Maxwell Patch is loaded");
}
}