Decompiled source of secret v1.0.0

plugins/Ola Chicos/Ola Chicos.dll

Decompiled 6 hours ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Ola_Chicos.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("Ola Chicos")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ola Chicos")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("41e7aec2-a85e-45c8-936b-6b1397be1bd4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Ola_Chicos
{
	[BepInPlugin("Ola.Chicos", "Ola Chicos", "1.0.0")]
	public class OlaChicos : BaseUnityPlugin
	{
		private const string modGUID = "Ola.Chicos";

		private const string modName = "Ola Chicos";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Ola.Chicos");

		private static OlaChicos Instance;

		internal ManualLogSource mls;

		internal static List<AudioClip> SoundFX;

		internal static AssetBundle bundle;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Ola.Chicos");
			mls.LogInfo((object)"Test is awake :)");
			harmony.PatchAll(typeof(FlowermanKillPatch));
			SoundFX = new List<AudioClip>();
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			location = location.TrimEnd("Ola Chicos.dll".ToCharArray());
			bundle = AssetBundle.LoadFromFile(location + "judgementsound");
			mls.LogInfo((object)location);
			mls.LogInfo((object)bundle);
			if ((Object)(object)bundle != (Object)null)
			{
				mls.LogInfo((object)"Successfully loaded asset bundle");
				SoundFX = bundle.LoadAllAssets<AudioClip>().ToList();
			}
			else
			{
				mls.LogError((object)"Failed to load asset bundle");
			}
		}
	}
}
namespace Ola_Chicos.Patches
{
	[HarmonyPatch(typeof(FlowermanAI))]
	internal class FlowermanKillPatch
	{
		[HarmonyPatch("killAnimation")]
		[HarmonyPostfix]
		private static void PlayKillAudio(FlowermanAI __instance)
		{
			__instance.crackNeckAudio.PlayOneShot(OlaChicos.SoundFX[0]);
			WalkieTalkie.TransmitOneShotAudio(__instance.crackNeckAudio, OlaChicos.SoundFX[0], 1f);
		}
	}
}