Decompiled source of CoolerEclipseLobby v1.0.0

CoolerEclipseLobby.dll

Decompiled 8 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 Microsoft.CodeAnalysis;
using R2API;
using RoR2;
using UnityEngine;
using UnityEngine.AddressableAssets;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("CoolerEclipseLobby")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("CoolerEclipseLobby")]
[assembly: AssemblyTitle("CoolerEclipseLobby")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace CoolerEclipseLobby
{
	[BepInPlugin("com.Nuxlar.CoolerEclipseLobby", "CoolerEclipseLobby", "1.0.0")]
	public class CoolerEclipseLobby : BaseUnityPlugin
	{
		private static GameObject eclipseWeather = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/eclipseworld/Weather, Eclipse.prefab").WaitForCompletion();

		private static GameObject eclipseLobby = PrefabAPI.InstantiateClone(((Run)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerRun.prefab").WaitForCompletion().GetComponent<InfiniteTowerRun>()).lobbyBackgroundPrefab, "CoolerEclipseLobbyNux", false);

		private static GameObject eclipseRun = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/EclipseRun/EclipseRun.prefab").WaitForCompletion();

		public void Awake()
		{
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			((Component)eclipseLobby.transform.GetChild(6)).gameObject.SetActive(true);
			((Component)eclipseLobby.transform.GetChild(6).GetChild(0)).gameObject.SetActive(true);
			((Component)eclipseLobby.transform.GetChild(7)).gameObject.SetActive(false);
			((Component)eclipseLobby.transform.GetChild(8)).gameObject.SetActive(false);
			((Component)eclipseLobby.transform.GetChild(9).GetChild(11)).gameObject.SetActive(false);
			((Component)eclipseLobby.transform.GetChild(9).GetChild(12)).gameObject.SetActive(false);
			((Component)eclipseLobby.transform.GetChild(11)).gameObject.SetActive(false);
			GameObject obj = Object.Instantiate<GameObject>(eclipseWeather, eclipseLobby.transform);
			((Component)obj.transform.GetChild(2)).GetComponent<SetAmbientLight>().ApplyLighting();
			((Component)obj.transform.GetChild(1)).gameObject.SetActive(false);
			Transform child = obj.transform.GetChild(3).GetChild(2);
			((Component)child).gameObject.SetActive(true);
			child.localPosition = new Vector3(-0.6f, 0f, -0.95f);
			child.localEulerAngles = new Vector3(0f, 270f, 0f);
			child.localScale = new Vector3(0.25f, 0.25f, 0.25f);
			Transform child2 = child.GetChild(0);
			child2.localPosition = Vector3.zero;
			child2.localEulerAngles = new Vector3(0f, 120f, 0f);
			((Run)eclipseRun.GetComponent<EclipseRun>()).lobbyBackgroundPrefab = eclipseLobby;
		}
	}
}