Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of LCDrossito v1.11.0
LCDrossito.dll
Decompiled 2 years agousing 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 GameNetcodeStuff; using HarmonyLib; using LCDrossito.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("LCDrossito")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LCDrossito")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("611571de-bf97-4fb2-8956-5b78554e0ad9")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace LCDrossito { [BepInPlugin("Caba.LCDrossito", "LCDrossito Mod", "1.0.0")] public class LCDrossito : BaseUnityPlugin { private const string modGUID = "Caba.LCDrossito"; private const string modName = "LCDrossito Mod"; private const string modVersion = "1.0.0"; private readonly Harmony harmony = new Harmony("Caba.LCDrossito"); private static LCDrossito 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("Caba.LCDrossito"); mls.LogInfo((object)"LCDrossito ha se desperto :D"); mls = ((BaseUnityPlugin)this).Logger; SoundFX = new List<AudioClip>(); string location = ((BaseUnityPlugin)Instance).Info.Location; location = location.TrimEnd("LCDrossito.dll".ToCharArray()); Bundle = AssetBundle.LoadFromFile(location + "turret"); if ((Object)(object)Bundle != (Object)null) { SoundFX = Bundle.LoadAllAssets<AudioClip>().ToList(); mls.LogInfo((object)"AssetBundle loaded correctly C==3"); } else { mls.LogError((object)"Failed to load Asset Bundle bruh !!"); } harmony.PatchAll(typeof(LCDrossito)); harmony.PatchAll(typeof(TurretBPatch)); harmony.PatchAll(typeof(VehicleControllerPatch)); harmony.PatchAll(typeof(StartOfRoundPatch)); } } } namespace LCDrossito.Patches { [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void infiniteSprintPatch(ref float ___sprintMeter) { } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void OverrideAudio(ref StartOfRound __instance) { __instance.shipIntroSpeechSFX = LCDrossito.SoundFX[5]; } } [HarmonyPatch(typeof(Turret))] internal class TurretBPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void OverrideAudio(ref Turret __instance) { __instance.firingSFX = LCDrossito.SoundFX[6]; __instance.detectPlayerSFX = LCDrossito.SoundFX[4]; __instance.turretActive = Object.op_Implicit((Object)(object)LCDrossito.SoundFX[3]); __instance.chargingSFX = LCDrossito.SoundFX[2]; } } [HarmonyPatch(typeof(VehicleController))] internal class VehicleControllerPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void OverrideAudio(ref VehicleController __instance) { __instance.radioClips[0] = LCDrossito.SoundFX[1]; __instance.radioClips[1] = LCDrossito.SoundFX[5]; __instance.hornAudio.clip = LCDrossito.SoundFX[0]; } } }