Decompiled source of CrystalCluster v0.0.3

CrystalClusterMod.dll

Decompiled 3 hours 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 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("CrystalClusterMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CrystalClusterMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("95810d41-bb53-43dc-9303-9f2ad6f2cfd4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ItemTutorial;

[BepInPlugin("hhunter.crystalcluster", "Crystal Clusters", "0.0.3")]
public class Plugin : BaseUnityPlugin
{
	private const string GUID = "hhunter.crystalcluster";

	private const string NAME = "Crystal Clusters";

	private const string VERSION = "0.0.3";

	public static Plugin instance;

	private void Awake()
	{
		instance = this;
		string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "crystalcluster");
		AssetBundle val = AssetBundle.LoadFromFile(text);
		Item val2 = val.LoadAsset<Item>("Assets/CrystalMod/CrystalClusterItem.asset");
		Item val3 = val.LoadAsset<Item>("Assets/CrystalMod/CrystalClusterItem_Blue.asset");
		Item val4 = val.LoadAsset<Item>("Assets/CrystalMod/CrystalClusterItem_Green.asset");
		Item val5 = val.LoadAsset<Item>("Assets/CrystalMod/CrystalClusterItem_purple.asset");
		Item val6 = val.LoadAsset<Item>("Assets/CrystalMod/CrystalClusterItem_red.asset");
		Item val7 = val.LoadAsset<Item>("Assets/CrystalMod/CrystalClusterItem_yellow.asset");
		NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
		NetworkPrefabs.RegisterNetworkPrefab(val3.spawnPrefab);
		NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab);
		NetworkPrefabs.RegisterNetworkPrefab(val5.spawnPrefab);
		NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab);
		NetworkPrefabs.RegisterNetworkPrefab(val7.spawnPrefab);
		Utilities.FixMixerGroups(val2.spawnPrefab);
		Utilities.FixMixerGroups(val3.spawnPrefab);
		Utilities.FixMixerGroups(val4.spawnPrefab);
		Utilities.FixMixerGroups(val5.spawnPrefab);
		Utilities.FixMixerGroups(val6.spawnPrefab);
		Utilities.FixMixerGroups(val7.spawnPrefab);
		Items.RegisterScrap(val2, 30, (LevelTypes)(-1));
		Items.RegisterScrap(val3, 30, (LevelTypes)(-1));
		Items.RegisterScrap(val4, 30, (LevelTypes)(-1));
		Items.RegisterScrap(val5, 30, (LevelTypes)(-1));
		Items.RegisterScrap(val6, 30, (LevelTypes)(-1));
		Items.RegisterScrap(val7, 30, (LevelTypes)(-1));
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Patched Crystal Clusters Mod");
	}
}