using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using ContinueFired.Patches;
using HarmonyLib;
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("ContinueFired")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ContinueFired")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e90bb01f-7464-4942-81f8-7350c795b591")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ContinueFired
{
[BepInPlugin("Ex.JojoFiredSFXMod", "Ex Jojo TBC Fired SFX Mod", "1.0.0")]
public class ContinueFiredBase : BaseUnityPlugin
{
private const string modGUID = "Ex.JojoFiredSFXMod";
private const string modName = "Ex Jojo TBC Fired SFX Mod";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("Ex.JojoFiredSFXMod");
private static ContinueFiredBase Instance;
internal ManualLogSource mls;
internal static AudioClip newFiredVoiceSFX;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("Ex.JojoFiredSFXMod");
mls.LogInfo((object)"Jojo Fired TBC SFX mod has initiated");
string location = ((BaseUnityPlugin)Instance).Info.Location;
string text = "ContinueFired.dll";
string text2 = location.TrimEnd(text.ToCharArray());
string text3 = text2 + "JojoTBCSFX";
AssetBundle val = AssetBundle.LoadFromFile(text3);
if ((Object)(object)val == (Object)null)
{
mls.LogError((object)"Failed to load audio assets!");
return;
}
newFiredVoiceSFX = val.LoadAsset<AudioClip>("Assets/TBC.mp3");
harmony.PatchAll(typeof(ContinueFiredBase));
harmony.PatchAll(typeof(ContinueFiredPatch));
mls.LogInfo((object)"This IS a Jojo reference.");
}
}
}
namespace ContinueFired.Patches
{
[HarmonyPatch(typeof(StartOfRound))]
internal class ContinueFiredPatch
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void JojoTBCSFXPatch(ref AudioClip ___firedVoiceSFX)
{
___firedVoiceSFX = ContinueFiredBase.newFiredVoiceSFX;
}
}
}