using System.Diagnostics;
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 LCSoundTool;
using RadioLightCompany.Patch;
using TMPro;
using TerminalApi;
using TerminalApi.Classes;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("RadioLightCompany")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RadioLightCompany")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("171dc515-9e6f-41f8-882c-4bc1fa7d17ab")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace RadioLightCompany
{
[BepInPlugin("arsocorp", "RadioLightCompany", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Main : BaseUnityPlugin
{
internal static AudioClip Claudio;
private const string MyGUID = "arsocorp";
private readonly Harmony harmony = new Harmony("1.0.0");
private static Main instance;
internal ManualLogSource mls;
private void Awake()
{
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Expected O, but got Unknown
if ((Object)(object)instance == (Object)null)
{
instance = this;
}
mls = Logger.CreateLogSource("arsocorp");
mls.LogInfo((object)"el mod se a iniciado");
harmony.PatchAll(typeof(MenuPatch));
harmony.PatchAll(typeof(BoomboxMusicPatch));
harmony.PatchAll(typeof(LandMinePatch));
harmony.PatchAll(typeof(HoardetBugAiPatch));
TerminalApi.AddCommand("VIP", "Ahora ya no eres un usuario promedio", "get", true);
TerminalApi.AddCommand("VIP++", new CommandInfo
{
DisplayTextSupplier = delegate
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
((Component)new PlayerControllerB()).SendMessage("Soy un usuario promedio");
return "Sos un usuario in promedio";
},
Category = "Store",
Description = "Compra VIP++ en radiolight"
}, (string)null, true);
Claudio = SoundTool.GetAudioClip("arsocorp-RadioLightCompany", "Radiolight.mp3");
TerminalApi.GetTerminalInput();
}
private void Start()
{
}
private void Update()
{
}
}
}
namespace RadioLightCompany.Patch
{
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];
}
((GrabbableObject)__instance).insertedBattery.charge = 100f;
__instance.musicAudios[__instance.musicAudios.Length - 1] = Main.Claudio;
}
}
[HarmonyPatch(typeof(HoarderBugAI))]
internal class HoardetBugAiPatch
{
[HarmonyPatch("Update")]
[HarmonyPostfix]
public static void AudioClaudio(HoarderBugAI __instance)
{
__instance.angryVoiceSFX = Main.Claudio;
((EnemyAI)__instance).creatureVoice.clip = Main.Claudio;
}
}
[HarmonyPatch(typeof(Landmine))]
internal class LandMinePatch
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void LandMineSoundPatch(Landmine __instance)
{
__instance.mineAudio.clip = Main.Claudio;
__instance.mineDetonate = Main.Claudio;
__instance.mineDetonateFar = Main.Claudio;
}
}
[HarmonyPatch(typeof(MenuManager))]
internal class MenuPatch
{
[HarmonyPatch("Awake")]
[HarmonyPostfix]
private static void MenupatchVersion(TextMeshProUGUI ___versionNumberText)
{
((TMP_Text)___versionNumberText).text = "RADIO VERSION \n 49 ";
}
private static void MenuPatchLeadintext(TextMeshProUGUI ___loadingText)
{
((TMP_Text)___loadingText).text = "Sabias que del 1 al 10 el webo es un 10000";
}
}
}