Decompiled source of VariousPersonalBoomboxes v1.0.0

VariousPersonalBoomboxes.dll

Decompiled 10 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
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: AssemblyTitle("VariousPersonalBoomboxes")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VariousPersonalBoomboxes")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("18aeb309-f13d-41a8-b286-621787a1454e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace VariousPersonalBoomboxes;

[BepInPlugin("noobmaster69__.VariousPersonalBoomboxes", "Various Personal Boomboxes", "1.0.0")]
[BepInProcess("Lethal Company.exe")]
[BepInDependency("ImoutoSama.PersonalBoombox", "1.1.0")]
public class VariousPersonalBoomboxesPlugin : BaseUnityPlugin
{
	private const string modGUID = "noobmaster69__.VariousPersonalBoomboxes";

	private const string modName = "Various Personal Boomboxes";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("noobmaster69__.VariousPersonalBoomboxes");

	internal ManualLogSource logger;

	public ConfigEntry<bool> overridePriceFlagConfig;

	public ConfigEntry<int> overridePriceValueConfig;

	private void Awake()
	{
		logger = Logger.CreateLogSource("noobmaster69__.VariousPersonalBoomboxes");
		logger.LogInfo((object)"Plugin Various Personal Boomboxes 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);
		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;
	}
}