using System;
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 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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Keroppi.KeroBoomboxCollection")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("KeroBoomboxCollection")]
[assembly: AssemblyTitle("Keroppi.KeroBoomboxCollection")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Keroppi.KeroBoomboxCollection;
[BepInPlugin("Keroppi.KeroBoomboxCollection", "Kero Boombox Collection", "1.0.0")]
[BepInProcess("Lethal Company.exe")]
[BepInDependency("ImoutoSama.PersonalBoombox", "1.4.4")]
public class KeroBoomboxCollectionPlugin : BaseUnityPlugin
{
private const string modGUID = "Keroppi.KeroBoomboxCollection";
private const string modName = "Kero Boombox Collection";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("Keroppi.KeroBoomboxCollection");
public ConfigEntry<bool> overridePriceFlagConfig;
public ConfigEntry<int> overridePriceValueConfig;
private void Awake()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Kero Boombox Collection has been added!");
overridePriceFlagConfig = ((BaseUnityPlugin)this).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);
try
{
RequestData val = PersonalBoomboxPlugin.AddFromAssemblyDll(Assembly.GetExecutingAssembly().Location);
val.overridePriceFlag = overridePriceFlagConfig.Value;
val.overridePriceValue = overridePriceValueConfig.Value;
((BaseUnityPlugin)this).Logger.LogInfo((object)"Successfully added boomboxes!");
}
catch (Exception ex)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Failed to add boomboxes: " + ex.Message));
((BaseUnityPlugin)this).Logger.LogError((object)ex.StackTrace);
}
}
public ConfigEntry<int> ConfigBindClamp(string section, string key, int defaultValue, string description, int min, int max)
{
ConfigEntry<int> val = ((BaseUnityPlugin)this).Config.Bind<int>(section, key, defaultValue, description);
val.Value = Mathf.Clamp(val.Value, min, max);
return val;
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "Keroppi.KeroBoomboxCollection";
public const string PLUGIN_NAME = "KeroBoomboxCollection";
public const string PLUGIN_VERSION = "1.0.0";
}