Decompiled source of GojoScrap v3.2.0

GojoScrap.dll

Decompiled 11 months ago
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
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("GojoScrap")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GojoScrap")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ba346217-4e85-4fc7-9f85-4b267f1decf4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace GojoScrap
{
	[BepInPlugin("lvnqa.GojoScrap", "Gojo Scrap", "3.1.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "lvnqa.GojoScrap";

		private const string modName = "Gojo Scrap";

		private const string modVersion = "3.1.0";

		public static Plugin instance;

		public static AssetBundle LoadAssetBundleFromResources(string bundleName, Assembly resourceAssembly)
		{
			if (resourceAssembly == null)
			{
				throw new ArgumentNullException("Parameter resourceAssembly can not be null.");
			}
			string text = null;
			try
			{
				text = resourceAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(bundleName));
			}
			catch (Exception)
			{
			}
			if (text == null)
			{
				Debug.LogError((object)("AssetBundle " + bundleName + " not found in assembly manifest"));
				return null;
			}
			AssetBundle result;
			using (Stream stream = resourceAssembly.GetManifestResourceStream(text))
			{
				result = AssetBundle.LoadFromStream(stream);
			}
			return result;
		}

		private void Awake()
		{
			instance = this;
			AssetBundle val = LoadAssetBundleFromResources("gojofigureassetbundle", Assembly.GetExecutingAssembly());
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded asset bundle");
			Item val2 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/GojoFigureItem.asset");
			Utilities.FixMixerGroups(val2.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
			Items.RegisterScrap(val2, 20, (LevelTypes)(-1));
			Item val3 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/GojoFigureItemBronze.asset");
			Utilities.FixMixerGroups(val3.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val3.spawnPrefab);
			Items.RegisterScrap(val3, 15, (LevelTypes)(-1));
			Item val4 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/GojoFigureItemSilver.asset");
			Utilities.FixMixerGroups(val4.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab);
			Items.RegisterScrap(val4, 10, (LevelTypes)(-1));
			Item val5 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/GojoFigureItemGold.asset");
			Utilities.FixMixerGroups(val5.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val5.spawnPrefab);
			Items.RegisterScrap(val5, 5, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Gojo");
			Item val6 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/ItadoriItem.asset");
			Utilities.FixMixerGroups(val6.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab);
			Items.RegisterScrap(val6, 20, (LevelTypes)(-1));
			Item val7 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/ItadoriItemBronze.asset");
			Utilities.FixMixerGroups(val7.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val7.spawnPrefab);
			Items.RegisterScrap(val7, 15, (LevelTypes)(-1));
			Item val8 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/ItadoriItemSilver.asset");
			Utilities.FixMixerGroups(val8.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val8.spawnPrefab);
			Items.RegisterScrap(val8, 10, (LevelTypes)(-1));
			Item val9 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/ItadoriItemGold.asset");
			Utilities.FixMixerGroups(val9.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val9.spawnPrefab);
			Items.RegisterScrap(val9, 5, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Yuji");
			Item val10 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/MegumiItem.asset");
			Utilities.FixMixerGroups(val10.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val10.spawnPrefab);
			Items.RegisterScrap(val10, 20, (LevelTypes)(-1));
			Item val11 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/MegumiItemBronze.asset");
			Utilities.FixMixerGroups(val11.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val11.spawnPrefab);
			Items.RegisterScrap(val11, 15, (LevelTypes)(-1));
			Item val12 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/MegumiItemSilver.asset");
			Utilities.FixMixerGroups(val12.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val12.spawnPrefab);
			Items.RegisterScrap(val12, 10, (LevelTypes)(-1));
			Item val13 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/MegumiItemGold.asset");
			Utilities.FixMixerGroups(val13.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val13.spawnPrefab);
			Items.RegisterScrap(val13, 5, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Megumi");
			Item val14 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/NobaraItem.asset");
			Utilities.FixMixerGroups(val14.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val14.spawnPrefab);
			Items.RegisterScrap(val14, 20, (LevelTypes)(-1));
			Item val15 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/NobaraItemBronze.asset");
			Utilities.FixMixerGroups(val15.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val15.spawnPrefab);
			Items.RegisterScrap(val15, 15, (LevelTypes)(-1));
			Item val16 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/NobaraItemSilver.asset");
			Utilities.FixMixerGroups(val16.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val16.spawnPrefab);
			Items.RegisterScrap(val16, 10, (LevelTypes)(-1));
			Item val17 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/NobaraItemGold.asset");
			Utilities.FixMixerGroups(val17.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val17.spawnPrefab);
			Items.RegisterScrap(val17, 5, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Nobara");
			Item val18 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/Glasses.asset");
			Utilities.FixMixerGroups(val18.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val18.spawnPrefab);
			Items.RegisterScrap(val18, 25, (LevelTypes)(-1));
			Item val19 = val.LoadAsset<Item>("Assets/Custom/GojoScrap/Textures/Items/NahIdWin.asset");
			Utilities.FixMixerGroups(val19.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(val19.spawnPrefab);
			Items.RegisterScrap(val19, 15, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded misc items");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Domain Expansion. Infinite Load.");
		}
	}
}
namespace GojoScrap.Properties
{
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	internal class Resources
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static ResourceManager ResourceManager
		{
			get
			{
				if (resourceMan == null)
				{
					ResourceManager resourceManager = new ResourceManager("GojoScrap.Properties.Resources", typeof(Resources).Assembly);
					resourceMan = resourceManager;
				}
				return resourceMan;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static CultureInfo Culture
		{
			get
			{
				return resourceCulture;
			}
			set
			{
				resourceCulture = value;
			}
		}

		internal static byte[] gojofigureassetbundle
		{
			get
			{
				object @object = ResourceManager.GetObject("gojofigureassetbundle", resourceCulture);
				return (byte[])@object;
			}
		}

		internal Resources()
		{
		}
	}
}