using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Repo_Moding.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: TargetFramework(".NETFramework,Version=4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace Repo_Moding
{
[BepInPlugin("free_bird", "Free Bird", "1.0.1")]
internal class Plugin : BaseUnityPlugin
{
private const string modId = "free_bird";
private const string modName = "Free Bird";
private const string modVersion = "1.0.1";
private readonly Harmony harmony = new Harmony("free_bird");
internal static ManualLogSource mls;
public static AudioClip[] free_bird;
private void Awake()
{
mls = Logger.CreateLogSource("free_bird");
free_bird = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "free_bird")).LoadAllAssets<AudioClip>();
harmony.PatchAll(typeof(Arenapatch));
harmony.PatchAll(typeof(Plugin));
}
}
}
namespace Repo_Moding.Patches
{
public static class Arenapatch
{
[HarmonyPatch(typeof(Arena), "Awake")]
[HarmonyPostfix]
private static void FreeBird()
{
Arena.instance.soundArenaMusic.Sounds = Plugin.free_bird;
}
}
}