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 MichaelJackson.patches;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MichaelJackson")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MichaelJackson")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("47660985-1408-474a-9658-f1801282bba1")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MichaelJackson
{
[BepInPlugin("Robustprogram.MichaelJackson", "MichaelJackson", "0.0.1")]
public class MichaelJacksonMod : BaseUnityPlugin
{
private const string modGUID = "Robustprogram.MichaelJackson";
private const string modName = "MichaelJackson";
private const string modVersion = "0.0.1";
private readonly Harmony harmony = new Harmony("Robustprogram.MichaelJackson");
private static MichaelJacksonMod Instance;
internal ManualLogSource mls;
internal static AudioClip[] springmanSFX;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("Robustprogram.MichaelJackson");
mls.LogInfo((object)"HEE HEE Initiated");
string location = ((BaseUnityPlugin)Instance).Info.Location;
string text = "MichaelJackson.dll";
AssetBundle obj = AssetBundle.LoadFromFile(location.TrimEnd(text.ToCharArray()) + "springmanaudio");
if ((Object)(object)obj == (Object)null)
{
mls.LogError((object)"Failed to load michael jackson :(");
}
springmanSFX = obj.LoadAllAssets<AudioClip>();
mls.LogInfo((object)springmanSFX.Length);
harmony.PatchAll(typeof(MichaelJacksonPatch));
mls.LogInfo((object)"The jacksoning shall begin");
}
}
}
namespace MichaelJackson.patches
{
[HarmonyPatch(typeof(SpringManAI))]
internal class MichaelJacksonPatch
{
[HarmonyPatch("__initializeVariables")]
[HarmonyPostfix]
public static void makeHimMichaelJackson(ref AudioClip[] ___springNoises)
{
___springNoises = MichaelJacksonMod.springmanSFX;
}
}
}