Decompiled source of ChristmasTreeDecor v1.0.1

Plugins/ChristmasTreeDecor.dll

Decompiled 3 days ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using LethalLib.Modules;
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("ChristmasTreeDecor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ChristmasTreeDecor")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("118c0b9c-641c-4f52-8401-2eae5460f414")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ChristmasTreeDecor;

[BepInPlugin("rkadery.ChristmasTreeDecor", "ChristmasTreeDecor", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private const string GUID = "rkadery.ChristmasTreeDecor";

	private const string NAME = "ChristmasTreeDecor";

	private const string VERSION = "1.0.0";

	public static Plugin instance;

	public static ConfigEntry<int> christmasTreePrice;

	public static ConfigEntry<int> redPresentBoxPrice;

	public static ConfigEntry<int> bluePresentBoxPrice;

	public static ConfigEntry<int> yellowPresentBoxPrice;

	public static ConfigEntry<int> tallRedPresentBoxPrice;

	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown
		if ((Object)instance == (Object)null)
		{
			instance = this;
		}
		christmasTreePrice = ((BaseUnityPlugin)this).Config.Bind<int>("Furniture", "Christmas Tree Price", 10, (ConfigDescription)null);
		redPresentBoxPrice = ((BaseUnityPlugin)this).Config.Bind<int>("Furniture", "RedPresent Box Price", 10, (ConfigDescription)null);
		bluePresentBoxPrice = ((BaseUnityPlugin)this).Config.Bind<int>("Furniture", "Blue Present Box Price", 10, (ConfigDescription)null);
		yellowPresentBoxPrice = ((BaseUnityPlugin)this).Config.Bind<int>("Furniture", "Yellow Present Box Price", 10, (ConfigDescription)null);
		tallRedPresentBoxPrice = ((BaseUnityPlugin)this).Config.Bind<int>("Furniture", "Tall Red Present Box Price", 10, (ConfigDescription)null);
		string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "christmastreemod");
		AssetBundle val = AssetBundle.LoadFromFile(text);
		UnlockablesList val2 = val.LoadAsset<UnlockablesList>("Assets/ChristmasTreeMod.asset");
		TerminalNodesList val3 = val.LoadAsset<TerminalNodesList>("Assets/ChristmasTreeModTerminalNodes/ChristmasTreeModTerminalNodes.asset");
		UnlockableItem val4 = val2.unlockables[0];
		NetworkPrefabs.RegisterNetworkPrefab(val4.prefabObject);
		Unlockables.RegisterUnlockable(val4, (StoreType)2, val3.terminalNodes[0], val3.terminalNodes[1], (TerminalNode)null, christmasTreePrice.Value);
		UnlockableItem val5 = val2.unlockables[1];
		NetworkPrefabs.RegisterNetworkPrefab(val5.prefabObject);
		Unlockables.RegisterUnlockable(val5, (StoreType)2, val3.terminalNodes[2], val3.terminalNodes[3], (TerminalNode)null, redPresentBoxPrice.Value);
		UnlockableItem val6 = val2.unlockables[2];
		NetworkPrefabs.RegisterNetworkPrefab(val6.prefabObject);
		Unlockables.RegisterUnlockable(val6, (StoreType)2, val3.terminalNodes[4], val3.terminalNodes[5], (TerminalNode)null, bluePresentBoxPrice.Value);
		UnlockableItem val7 = val2.unlockables[3];
		NetworkPrefabs.RegisterNetworkPrefab(val7.prefabObject);
		Unlockables.RegisterUnlockable(val7, (StoreType)2, val3.terminalNodes[6], val3.terminalNodes[7], (TerminalNode)null, yellowPresentBoxPrice.Value);
		UnlockableItem val8 = val2.unlockables[4];
		NetworkPrefabs.RegisterNetworkPrefab(val8.prefabObject);
		Unlockables.RegisterUnlockable(val8, (StoreType)2, val3.terminalNodes[8], val3.terminalNodes[9], (TerminalNode)null, tallRedPresentBoxPrice.Value);
	}
}