Decompiled source of AphelianSunFix v1.0.0

AphelianSunFix.dll

Decompiled 3 months 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 On.RoR2;
using RoR2;
using UnityEngine;
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("AphelianSunFix")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AphelianSunFix")]
[assembly: AssemblyTitle("AphelianSunFix")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace AphelianSunFix;

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

		public static hook_Start <>9__0_0;

		internal void <Awake>b__0_0(orig_Start orig, SceneDirector self)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "ancientloft")
			{
				GameObject val = GameObject.Find("AL_Sun");
				if (Object.op_Implicit((Object)(object)val))
				{
					val.transform.localPosition = new Vector3(-897.0126f, 350f, 209.9904f);
					val.transform.eulerAngles = new Vector3(275f, 90f, 90f);
				}
			}
		}
	}

	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
		object obj = <>c.<>9__0_0;
		if (obj == null)
		{
			hook_Start val = delegate(orig_Start orig, SceneDirector self)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self);
				Scene activeScene = SceneManager.GetActiveScene();
				if (((Scene)(ref activeScene)).name == "ancientloft")
				{
					GameObject val2 = GameObject.Find("AL_Sun");
					if (Object.op_Implicit((Object)(object)val2))
					{
						val2.transform.localPosition = new Vector3(-897.0126f, 350f, 209.9904f);
						val2.transform.eulerAngles = new Vector3(275f, 90f, 90f);
					}
				}
			};
			<>c.<>9__0_0 = val;
			obj = (object)val;
		}
		SceneDirector.Start += (hook_Start)obj;
	}
}