Decompiled source of CoolerHalcyoniteShrine v1.0.0

CoolerHalcyoniteShrine.dll

Decompiled 3 days ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using EntityStates.ShrineHalcyonite;
using On.RoR2;
using RoR2;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("CoolerHalcyoniteShrine")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("CoolerHalcyoniteShrine")]
[assembly: AssemblyTitle("CoolerHalcyoniteShrine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace CoolerHalcyoniteShrine;

[BepInPlugin("com.Nuxlar.CoolerHalcyoniteShrine", "CoolerHalcyoniteShrine", "1.0.0")]
public class CoolerHalcyoniteShrine : BaseUnityPlugin
{
	[Serializable]
	[CompilerGenerated]
	private sealed class <>c
	{
		public static readonly <>c <>9 = new <>c();

		public static hook_TrackInteractions <>9__0_0;

		public static hook_DestroyDrainVFX <>9__0_1;

		internal void <Awake>b__0_0(orig_TrackInteractions orig, HalcyoniteShrineInteractable self)
		{
			orig.Invoke(self);
			if (((object)self.stateMachine.state).GetType() == typeof(ShrineHalcyoniteNoQuality))
			{
				GameObject gameObject = ((Component)((Component)self).gameObject.transform.GetChild(7)).gameObject;
				GameObject gameObject2 = ((Component)((Component)self).gameObject.transform.GetChild(8)).gameObject;
				GameObject gameObject3 = ((Component)((Component)self).gameObject.transform.GetChild(9)).gameObject;
				if (!gameObject.activeSelf && !gameObject2.activeSelf && !gameObject3.activeSelf)
				{
					gameObject.SetActive(true);
					gameObject2.SetActive(true);
					gameObject3.SetActive(true);
				}
			}
		}

		internal void <Awake>b__0_1(orig_DestroyDrainVFX orig, HalcyoniteShrineInteractable self)
		{
			orig.Invoke(self);
			GameObject gameObject = ((Component)((Component)self).gameObject.transform.GetChild(7)).gameObject;
			GameObject gameObject2 = ((Component)((Component)self).gameObject.transform.GetChild(8)).gameObject;
			GameObject gameObject3 = ((Component)((Component)self).gameObject.transform.GetChild(9)).gameObject;
			if (gameObject.activeSelf && gameObject2.activeSelf && gameObject3.activeSelf)
			{
				gameObject.SetActive(false);
				gameObject2.SetActive(false);
				gameObject3.SetActive(false);
			}
		}
	}

	public void Awake()
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Expected O, but got Unknown
		object obj = <>c.<>9__0_0;
		if (obj == null)
		{
			hook_TrackInteractions val = delegate(orig_TrackInteractions orig, HalcyoniteShrineInteractable self)
			{
				orig.Invoke(self);
				if (((object)self.stateMachine.state).GetType() == typeof(ShrineHalcyoniteNoQuality))
				{
					GameObject gameObject4 = ((Component)((Component)self).gameObject.transform.GetChild(7)).gameObject;
					GameObject gameObject5 = ((Component)((Component)self).gameObject.transform.GetChild(8)).gameObject;
					GameObject gameObject6 = ((Component)((Component)self).gameObject.transform.GetChild(9)).gameObject;
					if (!gameObject4.activeSelf && !gameObject5.activeSelf && !gameObject6.activeSelf)
					{
						gameObject4.SetActive(true);
						gameObject5.SetActive(true);
						gameObject6.SetActive(true);
					}
				}
			};
			<>c.<>9__0_0 = val;
			obj = (object)val;
		}
		HalcyoniteShrineInteractable.TrackInteractions += (hook_TrackInteractions)obj;
		object obj2 = <>c.<>9__0_1;
		if (obj2 == null)
		{
			hook_DestroyDrainVFX val2 = delegate(orig_DestroyDrainVFX orig, HalcyoniteShrineInteractable self)
			{
				orig.Invoke(self);
				GameObject gameObject = ((Component)((Component)self).gameObject.transform.GetChild(7)).gameObject;
				GameObject gameObject2 = ((Component)((Component)self).gameObject.transform.GetChild(8)).gameObject;
				GameObject gameObject3 = ((Component)((Component)self).gameObject.transform.GetChild(9)).gameObject;
				if (gameObject.activeSelf && gameObject2.activeSelf && gameObject3.activeSelf)
				{
					gameObject.SetActive(false);
					gameObject2.SetActive(false);
					gameObject3.SetActive(false);
				}
			};
			<>c.<>9__0_1 = val2;
			obj2 = (object)val2;
		}
		HalcyoniteShrineInteractable.DestroyDrainVFX += (hook_DestroyDrainVFX)obj2;
	}
}