using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using PersonalBoombox;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("Sidious-Boomboxes")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Sidious-Boomboxes")]
[assembly: AssemblyTitle("Sidious-Boomboxes")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Sidious_Boomboxes;
[BepInPlugin("Sidious.BoomBox", "Sidious Boom Box", "1.0.0")]
[BepInProcess("Lethal Company.exe")]
[BepInDependency("ImoutoSama.PersonalBoombox", "1.4.2")]
public class BoomBox : BaseUnityPlugin
{
public static class SidiousConfig
{
public static ConfigEntry<bool> overridePriceFlagConfig;
public static ConfigEntry<int> overridePriceValueConfig;
public static void BindConfig()
{
overridePriceFlagConfig = ((BaseUnityPlugin)instance).Config.Bind<bool>("General", "Override Price Flag", false, "If you want to override price of the boomboxes, you MUST set this to true.");
overridePriceValueConfig = ConfigBindClamp("General", "Override Price Value", 30, "Overrides the price of the boomboxes by this value. Clamped from 0 to 1000.", 0, 1000);
}
public static ConfigEntry<int> ConfigBindClamp(string section, string key, int defaultValue, string description, int min, int max)
{
ConfigEntry<int> obj = ((BaseUnityPlugin)instance).Config.Bind<int>(section, key, defaultValue, description);
obj.Value = Mathf.Clamp(obj.Value, min, max);
return obj;
}
}
public static BoomBox instance;
private const string modGUID = "Sidious.BoomBox";
private const string modName = "Sidious ";
private const string modVersion = "1.0.0 ";
private readonly Harmony Harmony = new Harmony("Sidious.BoomBox");
public static ManualLogSource g_Log = new ManualLogSource("AutoNext");
private void Awake()
{
instance = this;
Harmony.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)("Sidious " + "1.0.0 Successfully Loaded."));
g_Log = ((BaseUnityPlugin)this).Logger;
SidiousConfig.BindConfig();
RequestData obj = PersonalBoomboxPlugin.AddFromAssemblyDll(Assembly.GetExecutingAssembly().Location);
obj.overridePriceFlag = SidiousConfig.overridePriceFlagConfig.Value;
obj.overridePriceValue = SidiousConfig.overridePriceValueConfig.Value;
}
}