Decompiled source of LvivskeRizdvyane v1.1.0

Lʹvivsʹke_Rizdvyane.dll

Decompiled 11 months ago
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
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("CoolMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CoolMod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("6c0c5c9f-7ae5-4332-9293-6fa4ba68198a")]
[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 CoolMod;

[BepInPlugin("TWRP", "LVIV", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	[HarmonyPatch(typeof(Skull), "Start")]
	public static class fumofiy
	{
		public static void Prefix(Skull __instance)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Invalid comparison between Unknown and I4
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Invalid comparison between Unknown and I4
			Renderer component = ((Component)__instance).gameObject.GetComponent<Renderer>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return;
			}
			ItemType itemType = ((Component)__instance).GetComponent<ItemIdentifier>().itemType;
			ItemType val = itemType;
			string key;
			if ((int)val != 1)
			{
				if ((int)val != 2)
				{
					return;
				}
				key = "LvivRed";
			}
			else
			{
				key = "LvivBlue";
			}
			component.enabled = false;
			GameObject val2 = allPivo[key];
			GameObject val3 = Object.Instantiate<GameObject>(val2, ((Component)component).transform);
			val3.transform.localRotation = Quaternion.Euler(0f, 20f, 100f);
			val3.transform.localPosition = new Vector3(0f, 0f, -0.05f);
			val3.transform.localScale = new Vector3(100f, 100f, 100f);
		}
	}

	public static Dictionary<string, GameObject> allPivo = new Dictionary<string, GameObject>();

	public static AssetBundle LvivBundle;

	private void Awake()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		LvivBundle = AssetBundle.LoadFromMemory(Resource1.lvivbundle);
		LvivBundle.LoadAllAssets();
		new Harmony("twrp.lviv").PatchAll();
		allPivo.Add("LvivBlue", LvivBundle.LoadAsset<GameObject>("LvivBlueGO"));
		allPivo.Add("LvivRed", LvivBundle.LoadAsset<GameObject>("LvivRedGO"));
	}
}
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[DebuggerNonUserCode]
[CompilerGenerated]
internal class Resource1
{
	private static ResourceManager resourceMan;

	private static CultureInfo resourceCulture;

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

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

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

	internal Resource1()
	{
	}
}