Decompiled source of PostLoopChef v1.0.0

PostLoopChef.dll

Decompiled 8 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using Microsoft.CodeAnalysis;
using PostLoopChef.StageAddons;
using R2API;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ExpansionManagement;
using RoR2BepInExPack.GameAssetPaths.Version_1_35_0;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;

[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("PostLoopChef")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+315b4e13ea5b2070dc2426f9e731c00b46f0559a")]
[assembly: AssemblyProduct("PostLoopChef")]
[assembly: AssemblyTitle("PostLoopChef")]
[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 PostLoopChef
{
	public class Assets
	{
		public static AssetBundle assetBundle;

		public static GameObject mealPrepTablePrefab;

		public static void Init()
		{
			GetAssetBundle();
			CreateMealPrepTable();
		}

		private static void CreateMealPrepTable()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Expected O, but got Unknown
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Expected O, but got Unknown
			//IL_0171: 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_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_037b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0429: Unknown result type (might be due to invalid IL or missing references)
			//IL_0436: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_0485: Unknown result type (might be due to invalid IL or missing references)
			//IL_048a: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0500: Unknown result type (might be due to invalid IL or missing references)
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_0520: Unknown result type (might be due to invalid IL or missing references)
			//IL_0525: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0560: Unknown result type (might be due to invalid IL or missing references)
			//IL_057b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05db: Unknown result type (might be due to invalid IL or missing references)
			mealPrepTablePrefab = assetBundle.LoadAsset<GameObject>("MealPrepTable");
			mealPrepTablePrefab.AddComponent<NetworkIdentity>();
			GameObject gameObject = ((Component)mealPrepTablePrefab.transform.Find("Bazaar_LunarTable (1)")).gameObject;
			gameObject.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_bazaar.mdlBazaarLunarTable_fbx).WaitForCompletion();
			((Renderer)gameObject.GetComponent<MeshRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC3_computationalexchange.matCEVoxelGlow_mat).WaitForCompletion();
			gameObject.GetComponent<MeshCollider>().sharedMesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_bazaar.mdlBazaarLunarTable_fbx).WaitForCompletion();
			gameObject.SetActive(false);
			GameObject gameObject2 = ((Component)mealPrepTablePrefab.transform.Find("LTWok")).gameObject;
			gameObject2.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_lemuriantemple_Assets.LTWok_prefab).WaitForCompletion().GetComponent<MeshFilter>()
				.mesh;
			((Renderer)gameObject2.GetComponent<MeshRenderer>()).materials = (Material[])(object)new Material[2]
			{
				new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_lemuriantemple_Assets.matLTBlackMetal_mat).WaitForCompletion()),
				new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_lemuriantemple_Assets.matLTCactus_mat).WaitForCompletion())
			};
			GameObject gameObject3 = ((Component)mealPrepTablePrefab.transform.Find("Cyberification")).gameObject;
			gameObject3.SetActive(false);
			GameObject gameObject4 = ((Component)mealPrepTablePrefab.transform.Find("Cyberification/Cube")).gameObject;
			gameObject4.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)Decalicious.DecalCube_asset).WaitForCompletion();
			Decal val = gameObject4.AddComponent<Decal>();
			val.RenderMode = (DecalRenderMode)0;
			val.Material = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC3_computationalexchange.matCyberificationDecal_mat).WaitForCompletion();
			val.Fade = 1f;
			val.DrawAlbedo = true;
			GameObject gameObject5 = ((Component)mealPrepTablePrefab.transform.Find("Cyberification/Skirt")).gameObject;
			gameObject5.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_Common_VFX.mdlVFXDonut5_fbx).WaitForCompletion();
			((Renderer)gameObject5.GetComponent<MeshRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC3_computationalexchange.matCyberification_mat).WaitForCompletion();
			GameObject gameObject6 = ((Component)mealPrepTablePrefab.transform.Find("DisplaySteakFlat/SteakMesh")).gameObject;
			MeshRenderer component = gameObject6.GetComponent<MeshRenderer>();
			((Renderer)component).material = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_FlatHealth.matSteak_mat).WaitForCompletion();
			gameObject6.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_FlatHealth.mdlSteak_fbx).WaitForCompletion();
			GameObject gameObject7 = ((Component)mealPrepTablePrefab.transform.Find("DisplaySteakFlat")).gameObject;
			gameObject7.AddComponent<ItemDisplay>().rendererInfos = (RendererInfo[])(object)new RendererInfo[1]
			{
				new RendererInfo
				{
					defaultMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_FlatHealth.matSteak_mat).WaitForCompletion(),
					renderer = (Renderer)(object)component
				}
			};
			gameObject6 = ((Component)mealPrepTablePrefab.transform.Find("DisplaySteakFlat (1)/SteakMesh")).gameObject;
			component = gameObject6.GetComponent<MeshRenderer>();
			((Renderer)component).material = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_FlatHealth.matSteak_mat).WaitForCompletion();
			gameObject6.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_FlatHealth.mdlSteak_fbx).WaitForCompletion();
			gameObject7 = ((Component)mealPrepTablePrefab.transform.Find("DisplaySteakFlat (1)")).gameObject;
			gameObject7.AddComponent<ItemDisplay>().rendererInfos = (RendererInfo[])(object)new RendererInfo[1]
			{
				new RendererInfo
				{
					defaultMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_FlatHealth.matSteak_mat).WaitForCompletion(),
					renderer = (Renderer)(object)component
				}
			};
			gameObject6 = ((Component)mealPrepTablePrefab.transform.Find("DisplaySteakFlat (2)/SteakMesh")).gameObject;
			component = gameObject6.GetComponent<MeshRenderer>();
			((Renderer)component).material = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_FlatHealth.matSteak_mat).WaitForCompletion();
			gameObject6.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_FlatHealth.mdlSteak_fbx).WaitForCompletion();
			gameObject7 = ((Component)mealPrepTablePrefab.transform.Find("DisplaySteakFlat (2)")).gameObject;
			gameObject7.AddComponent<ItemDisplay>().rendererInfos = (RendererInfo[])(object)new RendererInfo[1]
			{
				new RendererInfo
				{
					defaultMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_FlatHealth.matSteak_mat).WaitForCompletion(),
					renderer = (Renderer)(object)component
				}
			};
			GameObject gameObject8 = ((Component)mealPrepTablePrefab.transform.Find("mdlCEVoxelObjectA")).gameObject;
			gameObject8.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_DLC3_computationalexchange.mdlCEVoxelObjectA_fbx).WaitForCompletion();
			((Renderer)gameObject8.GetComponent<MeshRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_lakes_Assets.matTLRocks_mat).WaitForCompletion();
			GameObject gameObject9 = ((Component)mealPrepTablePrefab.transform.Find("mdlMealPrepTable/MealPrepTable")).gameObject;
			gameObject9.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_bazaar.mdlBazaarLunarTable_fbx).WaitForCompletion();
			((Renderer)gameObject9.GetComponent<MeshRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_lakesnight_Assets.matTLTerrainStoneNight_mat).WaitForCompletion();
			gameObject9.AddComponent<MeshCollider>().sharedMesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_bazaar.mdlBazaarLunarTable_fbx).WaitForCompletion();
			GameObject gameObject10 = ((Component)mealPrepTablePrefab.transform.Find("meshChefCleaverGhost1/meshlChefCleaver002")).gameObject;
			gameObject10.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_DLC2_Chef.meshChefCleaverGhost1_FBX).WaitForCompletion();
			((Renderer)gameObject10.GetComponent<MeshRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC3_MealPrep.matMealPrep_mat).WaitForCompletion();
			GameObject gameObject11 = ((Component)mealPrepTablePrefab.transform.Find("PickupSeed/mdlSeed")).gameObject;
			((Renderer)gameObject11.GetComponent<MeshRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Seed.matSeed_mat).WaitForCompletion();
			gameObject11.GetComponent<MeshFilter>().mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_Seed.mdlSeed_fbx).WaitForCompletion();
			GameObject gameObject12 = ((Component)mealPrepTablePrefab.transform.Find("PickupSeed")).gameObject;
			ModelPanelParameters val2 = gameObject12.AddComponent<ModelPanelParameters>();
			val2.focusPointTransform = mealPrepTablePrefab.transform.Find("PickupSeed/FocusPoint(Clone)");
			val2.cameraPositionTransform = mealPrepTablePrefab.transform.Find("PickupSeed/CameraPosition(Clone)");
			val2.minDistance = 3f;
			val2.maxDistance = 6f;
			PrefabAPI.RegisterNetworkPrefab(mealPrepTablePrefab);
		}

		private static void GetAssetBundle()
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("PostLoopChef.mwmwpostloopchefbundle");
			if (stream != null)
			{
				assetBundle = AssetBundle.LoadFromStream(stream);
			}
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	public class Options
	{
		private static bool? _rooEnabled;

		public static bool rooEnabled
		{
			get
			{
				if (!_rooEnabled.HasValue)
				{
					_rooEnabled = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
				}
				return _rooEnabled.Value;
			}
		}

		public static ConfigEntry<bool> craterChestsEnabled { get; set; }

		public static void Init()
		{
			craterChestsEnabled = PostLoopChef.config.Bind<bool>("Repurposed Crater", "Legendary Chest Enabled", true, "Whether or not the legendary chest still appears.");
			if (rooEnabled)
			{
				RoOInit();
			}
		}

		private static void RoOInit()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(craterChestsEnabled, new CheckBoxConfig()));
			ModSettingsManager.SetModDescription("Config options relating to the PostLoopChef mod.");
			ModSettingsManager.SetModIcon(Assets.assetBundle.LoadAsset<Sprite>("icon"));
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("mwmw.PostLoopChef", "PostLoopChef", "1.0.0")]
	public class PostLoopChef : BaseUnityPlugin
	{
		public const string PluginGUID = "mwmw.PostLoopChef";

		public const string PluginAuthor = "mwmw";

		public const string PluginName = "PostLoopChef";

		public const string PluginVersion = "1.0.0";

		public static ConfigFile config;

		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			config = ((BaseUnityPlugin)this).Config;
			Assets.Init();
			Options.Init();
			new ViscousFallsAddon().Init();
			new IronAurorasAddon().Init();
			new GoldenDiebackAddon().Init();
			new ComputationalExchangeAddon().Init();
			new RepurposedCraterAddon().Init();
		}
	}
}
namespace PostLoopChef.StageAddons
{
	public abstract class BaseStageAddon
	{
		protected abstract string scene_name { get; }

		private void CreateAddonsOnScene(Stage stage)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == scene_name && Run.instance.IsExpansionEnabled(Addressables.LoadAssetAsync<ExpansionDef>((object)RoR2_DLC3.DLC3_asset).WaitForCompletion()))
			{
				CreateAddons();
			}
		}

		protected abstract void CreateAddons();

		public void Init()
		{
			Stage.onServerStageBegin += CreateAddonsOnScene;
		}
	}
	public class ComputationalExchangeAddon : BaseStageAddon
	{
		[CompilerGenerated]
		private sealed class <SetNewDronePrice>d__3 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public DroneVendorMultiShopController droneShop;

			public ComputationalExchangeAddon <>4__this;

			private DroneVendorTerminalBehavior[] <>s__1;

			private int <>s__2;

			private DroneVendorTerminalBehavior <droneVendorTerminalBehavior>5__3;

			private PurchaseInteraction <component>5__4;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <SetNewDronePrice>d__3(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>s__1 = null;
				<droneVendorTerminalBehavior>5__3 = null;
				<component>5__4 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					droneShop.Networkcost = 0;
					if (droneShop._terminals != null)
					{
						<>s__1 = droneShop._terminals;
						for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++)
						{
							<droneVendorTerminalBehavior>5__3 = <>s__1[<>s__2];
							<component>5__4 = ((Component)<droneVendorTerminalBehavior>5__3).GetComponent<PurchaseInteraction>();
							<component>5__4.Networkcost = 0;
							<component>5__4 = null;
							<droneVendorTerminalBehavior>5__3 = null;
						}
						<>s__1 = null;
					}
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		protected override string scene_name => "computationalexchange";

		protected override void CreateAddons()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: 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)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Expected O, but got Unknown
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Expected O, but got Unknown
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>();
			val.prefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_TripleDroneShop.TripleDroneShop_prefab).WaitForCompletion();
			val.sendOverNetwork = true;
			val.directorCreditCost = 0;
			val.occupyPosition = false;
			SpawnCard val2 = ScriptableObject.CreateInstance<SpawnCard>();
			val2.prefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_DuplicatorLarge.DuplicatorLarge_prefab).WaitForCompletion();
			val2.sendOverNetwork = true;
			val2.directorCreditCost = 0;
			val2.occupyPosition = false;
			DroneVendorMultiShopController component = val.DoSpawn(new Vector3(-25f, 10.4f, -54f), Quaternion.Euler(0f, 140f, 2f), new DirectorSpawnRequest(val, (DirectorPlacementRule)null, RoR2Application.rng)).spawnedInstance.GetComponent<DroneVendorMultiShopController>();
			DroneVendorMultiShopController component2 = val.DoSpawn(new Vector3(50.5f, 9.9f, -48f), Quaternion.Euler(0f, 220f, 0f), new DirectorSpawnRequest(val, (DirectorPlacementRule)null, RoR2Application.rng)).spawnedInstance.GetComponent<DroneVendorMultiShopController>();
			val2.DoSpawn(new Vector3(-29f, 51.7f, -178f), Quaternion.Euler(9f, 15f, 2f), new DirectorSpawnRequest(val2, (DirectorPlacementRule)null, RoR2Application.rng));
			((MonoBehaviour)component).StartCoroutine(SetNewDronePrice(component));
			((MonoBehaviour)component2).StartCoroutine(SetNewDronePrice(component2));
		}

		[IteratorStateMachine(typeof(<SetNewDronePrice>d__3))]
		private IEnumerator SetNewDronePrice(DroneVendorMultiShopController droneShop)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <SetNewDronePrice>d__3(0)
			{
				<>4__this = this,
				droneShop = droneShop
			};
		}
	}
	public class GoldenDiebackAddon : BaseStageAddon
	{
		protected override string scene_name => "habitatfall";

		protected override void CreateAddons()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Expected O, but got Unknown
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			if (Physics.Raycast(new Vector3(112.7f, 24f, -96.7f), Vector3.down, 5f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
			{
				GameObject val = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_MealPrep.MealPrep_prefab).WaitForCompletion());
				val.transform.position = new Vector3(114f, 24.4f, -97.2f);
				val.transform.localEulerAngles = new Vector3(0f, 200f, 0f);
				NetworkServer.Spawn(val);
				GameObject val2 = Object.Instantiate<GameObject>(Assets.mealPrepTablePrefab);
				val2.transform.position = new Vector3(112.7f, 23f, -96.7f);
				val2.transform.eulerAngles = new Vector3(0f, 200f, 0f);
				NetworkServer.Spawn(val2);
				SpawnCard val3 = ScriptableObject.CreateInstance<SpawnCard>();
				val3.prefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_ShrineCleanse.ShrineCleanse_prefab).WaitForCompletion();
				val3.sendOverNetwork = true;
				val3.directorCreditCost = 0;
				val3.occupyPosition = true;
				val3.DoSpawn(new Vector3(114f, 22.8f, -81.7f), Quaternion.Euler(0f, 0f, 2f), new DirectorSpawnRequest(val3, (DirectorPlacementRule)null, RoR2Application.rng));
			}
		}
	}
	public class IronAurorasAddon : BaseStageAddon
	{
		protected override string scene_name => "ironalluvium2";

		protected override void CreateAddons()
		{
			//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_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Expected O, but got Unknown
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_MealPrep.MealPrep_prefab).WaitForCompletion());
			val.transform.position = new Vector3(212f, 122.4f, 35.8f);
			val.transform.eulerAngles = new Vector3(356f, 170f, 2.7f);
			NetworkServer.Spawn(val);
			GameObject val2 = Object.Instantiate<GameObject>(Assets.mealPrepTablePrefab);
			val2.transform.position = new Vector3(211f, 121f, 35.6f);
			val2.transform.eulerAngles = new Vector3(356f, 170f, 2.7f);
			NetworkServer.Spawn(val2);
			SpawnCard val3 = ScriptableObject.CreateInstance<SpawnCard>();
			val3.prefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_TripleDroneShop.TripleDroneShop_prefab).WaitForCompletion();
			val3.sendOverNetwork = true;
			val3.directorCreditCost = 0;
			val3.occupyPosition = false;
			val3.DoSpawn(new Vector3(210.3f, 123f, 60.1f), Quaternion.Euler(12f, 260f, 4f), new DirectorSpawnRequest(val3, (DirectorPlacementRule)null, RoR2Application.rng));
		}
	}
	public class RepurposedCraterAddon : BaseStageAddon
	{
		protected override string scene_name => "repurposedcrater";

		protected override void CreateAddons()
		{
			//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_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_MealPrep.MealPrep_prefab).WaitForCompletion());
			val.transform.position = new Vector3(-228.4f, 15.35f, 73f);
			val.transform.eulerAngles = new Vector3(0f, 65f, 0f);
			NetworkServer.Spawn(val);
			GameObject val2 = Object.Instantiate<GameObject>(Assets.mealPrepTablePrefab);
			val2.transform.position = new Vector3(-228f, 13.9f, 72f);
			val2.transform.eulerAngles = new Vector3(0f, 65f, 0f);
			NetworkServer.Spawn(val2);
			GameObject val3 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VendingMachine.VendingMachine_prefab_e69e4c37).WaitForCompletion());
			Object.Destroy((Object)(object)val3.GetComponent<AlignToNormal>());
			val3.transform.position = new Vector3(-224f, 14f, 79f);
			val3.transform.eulerAngles = new Vector3(0f, 180f, 2f);
			NetworkServer.Spawn(val3);
			if (!Options.craterChestsEnabled.Value)
			{
				Scene activeScene = SceneManager.GetActiveScene();
				Transform val4 = ((IEnumerable<GameObject>)((Scene)(ref activeScene)).GetRootGameObjects()).FirstOrDefault((Func<GameObject, bool>)((GameObject obj) => ((Object)obj).name == "HOLDER: Toggle Groups")).transform.Find("GROUP_ GoldChest");
				((Component)val4.Find("CHOICE: UnderBuilding/GoldChest")).gameObject.SetActive(false);
				((Component)val4.Find("CHOICE: UnderBuildingHigh/GoldChest")).gameObject.SetActive(false);
				((Component)val4.Find("CHOICE: Crevasse/GoldChest")).gameObject.SetActive(false);
			}
		}
	}
	public class ViscousFallsAddon : BaseStageAddon
	{
		protected override string scene_name => "lakesnight";

		protected override void CreateAddons()
		{
			//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_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Expected O, but got Unknown
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Expected O, but got Unknown
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_MealPrep.MealPrep_prefab).WaitForCompletion());
			val.transform.position = new Vector3(-19.65f, -36.76f, 0.7f);
			val.transform.localEulerAngles = new Vector3(0f, 270f, 0f);
			NetworkServer.Spawn(val);
			GameObject val2 = Object.Instantiate<GameObject>(Assets.mealPrepTablePrefab);
			val2.transform.position = new Vector3(-19.6f, -38.2f, 1.8f);
			NetworkServer.Spawn(val2);
			SpawnCard val3 = ScriptableObject.CreateInstance<SpawnCard>();
			val3.prefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_TripleDroneShop.TripleDroneShop_prefab).WaitForCompletion();
			val3.sendOverNetwork = true;
			val3.directorCreditCost = 0;
			val3.occupyPosition = false;
			val3.DoSpawn(new Vector3(41f, -31.1f, 18f), Quaternion.Euler(0f, 290f, 2f), new DirectorSpawnRequest(val3, (DirectorPlacementRule)null, RoR2Application.rng));
			val3.DoSpawn(new Vector3(46f, -30.9f, 28f), Quaternion.Euler(0f, 290f, 0f), new DirectorSpawnRequest(val3, (DirectorPlacementRule)null, RoR2Application.rng));
		}
	}
}