Decompiled source of FreeBoomBox v1.0.0

FreeBoombox.dll

Decompiled 4 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 FreeBoombox;
using HarmonyLib;
using LethalCompanyPluginTemplate.Patches;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FreeBoombox")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FreeBoombox")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("05cab034-a277-4982-9c6b-5bcac532f670")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LethalCompanyPluginTemplate.Patches
{
	[HarmonyPatch(typeof(Terminal))]
	internal class salesPatch
	{
		[HarmonyPatch("SetItemSales")]
		[HarmonyPostfix]
		private static void StorePrices(ref Item[] ___buyableItemsList)
		{
			___buyableItemsList[6].creditsWorth = global::FreeBoombox.FreeBoombox.Boombox.Value;
		}
	}
}
namespace FreeBoombox
{
	[BepInPlugin("Reebus.FreeBoomBox", "FreeBoomBox", "1.0.0.0")]
	public class FreeBoombox : BaseUnityPlugin
	{
		private const string modGUID = "Reebus.FreeBoomBox";

		private const string modName = "FreeBoomBox";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("Reebus.FreeBoomBox");

		private static FreeBoombox Instance;

		internal ManualLogSource mls;

		public static ConfigEntry<int> Boombox;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Reebus.FreeBoomBox");
			mls.LogInfo((object)"FreeBoomBox Loaded!");
			LoadConfig();
			harmony.PatchAll(typeof(FreeBoombox));
			harmony.PatchAll(typeof(salesPatch));
		}

		private void LoadConfig()
		{
			Boombox = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Boombox", 0, "");
		}
	}
}