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 Microsoft.CodeAnalysis;
using On.RoR2;
using RoR2;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.SceneManagement;
[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 Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
}
namespace CoolerHalcyoniteShrine
{
[BepInPlugin("com.Nuxlar.CoolerHalcyoniteShrine", "CoolerHalcyoniteShrine", "1.0.3")]
public class CoolerHalcyoniteShrine : BaseUnityPlugin
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static hook_TrackInteractions <>9__1_0;
public static hook_DestroyDrainVFX <>9__1_1;
internal void <Awake>b__1_0(orig_TrackInteractions orig, HalcyoniteShrineInteractable self)
{
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self);
if (!(((object)self.stateMachine.state).GetType() == typeof(ShrineHalcyoniteNoQuality)))
{
return;
}
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)
{
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name == "snowyforest")
{
gameObject3.GetComponent<PostProcessDuration>().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0f, 2f, 0.95f);
}
gameObject.SetActive(true);
gameObject2.SetActive(true);
gameObject3.SetActive(true);
}
}
internal void <Awake>b__1_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);
}
}
}
private GameObject shrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/ShrineHalcyonite.prefab").WaitForCompletion();
public void Awake()
{
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_0116: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: Expected O, but got Unknown
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_013f: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Expected O, but got Unknown
GameObject gameObject = ((Component)shrine.transform.GetChild(9)).gameObject;
PostProcessDuration val = gameObject.AddComponent<PostProcessDuration>();
PostProcessVolume component = gameObject.GetComponent<PostProcessVolume>();
val.ppVolume = component;
val.maxDuration = 2f;
val.ppWeightCurve = AnimationCurve.EaseInOut(0f, 0f, 2f, 0.25f);
ObjectScaleCurve obj = ((Component)shrine.transform.GetChild(10)).gameObject.AddComponent<ObjectScaleCurve>();
obj.baseScale = Vector3.zero;
obj.timeMax = 1f;
obj.overallCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
obj.useOverallCurveOnly = true;
ObjectScaleCurve obj2 = ((Component)shrine.transform.GetChild(7)).gameObject.AddComponent<ObjectScaleCurve>();
obj2.baseScale = Vector3.zero;
obj2.timeMax = 1f;
obj2.overallCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
obj2.useOverallCurveOnly = true;
object obj3 = <>c.<>9__1_0;
if (obj3 == null)
{
hook_TrackInteractions val2 = delegate(orig_TrackInteractions orig, HalcyoniteShrineInteractable self)
{
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self);
if (((object)self.stateMachine.state).GetType() == typeof(ShrineHalcyoniteNoQuality))
{
GameObject gameObject5 = ((Component)((Component)self).gameObject.transform.GetChild(7)).gameObject;
GameObject gameObject6 = ((Component)((Component)self).gameObject.transform.GetChild(8)).gameObject;
GameObject gameObject7 = ((Component)((Component)self).gameObject.transform.GetChild(9)).gameObject;
if (!gameObject5.activeSelf && !gameObject6.activeSelf && !gameObject7.activeSelf)
{
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name == "snowyforest")
{
gameObject7.GetComponent<PostProcessDuration>().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0f, 2f, 0.95f);
}
gameObject5.SetActive(true);
gameObject6.SetActive(true);
gameObject7.SetActive(true);
}
}
};
<>c.<>9__1_0 = val2;
obj3 = (object)val2;
}
HalcyoniteShrineInteractable.TrackInteractions += (hook_TrackInteractions)obj3;
object obj4 = <>c.<>9__1_1;
if (obj4 == null)
{
hook_DestroyDrainVFX val3 = delegate(orig_DestroyDrainVFX orig, HalcyoniteShrineInteractable self)
{
orig.Invoke(self);
GameObject gameObject2 = ((Component)((Component)self).gameObject.transform.GetChild(7)).gameObject;
GameObject gameObject3 = ((Component)((Component)self).gameObject.transform.GetChild(8)).gameObject;
GameObject gameObject4 = ((Component)((Component)self).gameObject.transform.GetChild(9)).gameObject;
if (gameObject2.activeSelf && gameObject3.activeSelf && gameObject4.activeSelf)
{
gameObject2.SetActive(false);
gameObject3.SetActive(false);
gameObject4.SetActive(false);
}
};
<>c.<>9__1_1 = val3;
obj4 = (object)val3;
}
HalcyoniteShrineInteractable.DestroyDrainVFX += (hook_DestroyDrainVFX)obj4;
}
}
}