Decompiled source of NoVoidFieldsInteractables v1.0.1

NoVoidFieldsInteractables.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using On.RoR2;
using RoR2;
using UnityEngine;
using UnityEngine.AddressableAssets;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("NoVoidFieldsInteractables")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NoVoidFieldsInteractables")]
[assembly: AssemblyTitle("NoVoidFieldsInteractables")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoVoidFieldsInteractables
{
	[BepInPlugin("com.Moffein.NoVoidFieldsInteractables", "NoVoidFieldsInteractables", "1.0.1")]
	public class NoVoidFieldsInteractables : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_PopulateScene <>9__1_0;

			internal void <Awake>b__1_0(orig_PopulateScene orig, SceneDirector self)
			{
				if ((Object)(object)SceneCatalog.GetSceneDefForCurrentScene() == (Object)(object)voidFields)
				{
					self.interactableCredit = 0;
				}
				orig.Invoke(self);
			}
		}

		private static SceneDef voidFields;

		public void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: 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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			voidFields = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/Base/arena/arena.asset").WaitForCompletion();
			object obj = <>c.<>9__1_0;
			if (obj == null)
			{
				hook_PopulateScene val = delegate(orig_PopulateScene orig, SceneDirector self)
				{
					if ((Object)(object)SceneCatalog.GetSceneDefForCurrentScene() == (Object)(object)voidFields)
					{
						self.interactableCredit = 0;
					}
					orig.Invoke(self);
				};
				<>c.<>9__1_0 = val;
				obj = (object)val;
			}
			SceneDirector.PopulateScene += (hook_PopulateScene)obj;
		}
	}
}
namespace R2API.Utils
{
	[AttributeUsage(AttributeTargets.Assembly)]
	public class ManualNetworkRegistrationAttribute : Attribute
	{
	}
}