using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
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.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("LCBondrewdMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LCBondrewdMod")]
[assembly: AssemblyTitle("LCBondrewdMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace LCBondrewdMod;
[BepInPlugin("Momosapien.BondrewdBoombox", "Bondrewd Boombox", "1.0.0")]
[BepInProcess("Lethal Company.exe")]
[BepInDependency("ImoutoSama.PersonalBoombox", "1.4.2")]
public class BondrewdBoomboxPlugin : BaseUnityPlugin
{
private const string modGUID = "Momosapien.BondrewdBoombox";
private const string modName = "Bondrewd Boombox";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("Momosapien.BondrewdBoombox");
internal ManualLogSource logger;
public ConfigEntry<bool> overridePriceFlagConfig;
public ConfigEntry<int> overridePriceValueConfig;
private void Awake()
{
logger = Logger.CreateLogSource("Momosapien.BondrewdBoombox");
logger.LogInfo((object)"Plugin Bondrewd Boombox has been added!");
overridePriceFlagConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Override Price Flag", true, "If you want to override price of the boomboxes, you MUST set this to true.");
overridePriceValueConfig = ConfigBindClamp("General", "Override Price Value", 0, "Overrides the price of the boomboxes by this value. Clamped from 0 to 1000.", 0, 1000);
RequestData obj = PersonalBoomboxPlugin.AddFromAssemblyDll(Assembly.GetExecutingAssembly().Location);
obj.overridePriceFlag = overridePriceFlagConfig.Value;
obj.overridePriceValue = overridePriceValueConfig.Value;
}
public ConfigEntry<int> ConfigBindClamp(string section, string key, int defaultValue, string description, int min, int max)
{
ConfigEntry<int> obj = ((BaseUnityPlugin)this).Config.Bind<int>(section, key, defaultValue, description);
obj.Value = Mathf.Clamp(obj.Value, min, max);
return obj;
}
}