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 LCSoundTool;
using SkibidiBoombox.Patches;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SkibidiBoombox")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkibidiBoombox")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ac5b752d-5b22-4448-b21f-75ac11a28e01")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SkibidiBoombox
{
[BepInPlugin("com.thememermonkey.skibidiboombox", "Skibidi Boombox", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class PluginBase : BaseUnityPlugin
{
private const string PLUGIN_GUID = "com.thememermonkey.skibidiboombox";
private const string PLUGIN_NAME = "Skibidi Boombox";
private const string PLUGIN_VERSION = "1.0.0";
private readonly Harmony harmony = new Harmony("com.thememermonkey.skibidiboombox");
private static PluginBase instance;
internal static AudioClip skibidiSong;
public static ManualLogSource logSource;
private void Awake()
{
if ((Object)(object)instance == (Object)null)
{
instance = this;
}
logSource = Logger.CreateLogSource("com.thememermonkey.skibidiboombox");
logSource.LogInfo((object)"Plugin com.thememermonkey.skibidiboombox loaded!");
harmony.PatchAll(typeof(BoomboxMusicPatch));
skibidiSong = SoundTool.GetAudioClip("thememermonkey-SkibidiBoombox", "Audios", "skibidibopsong.wav");
logSource.LogInfo((object)"Plugin com.thememermonkey.skibidiboombox added skibidi bop song!");
}
}
}
namespace SkibidiBoombox.Patches
{
internal class BoomboxMusicPatch
{
[HarmonyPatch(typeof(BoomboxItem), "Start")]
[HarmonyPostfix]
public static void InsertSong(BoomboxItem __instance)
{
AudioClip[] musicAudios = __instance.musicAudios;
__instance.musicAudios = (AudioClip[])(object)new AudioClip[musicAudios.Length + 1];
for (int i = 0; i < musicAudios.Length; i++)
{
__instance.musicAudios[i] = musicAudios[i];
}
__instance.musicAudios[__instance.musicAudios.Length - 1] = PluginBase.skibidiSong;
PluginBase.logSource.LogDebug((object)$"Patched {__instance} with 1 new music track!");
}
}
}