Decompiled source of WLoopWeather v1.4.1

LoopVariants.dll

Decompiled a week ago
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.Destructible;
using EntityStates.Fauna;
using HG;
using IL.RoR2;
using LoopVariants.Properties;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.Destructible;
using On.EntityStates.Fauna;
using On.RoR2;
using On.RoR2.Networking;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ExpansionManagement;
using RoR2.Navigation;
using RoR2.UI;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;

[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("LoopVariants")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+99fbf36eab41e48d0b9a5ef12ef5ac1498ef78f3")]
[assembly: AssemblyProduct("LoopVariants")]
[assembly: AssemblyTitle("LoopVariants")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace LoopVariants
{
	public class WConfig
	{
		public enum EnumEnemyAdds
		{
			Never,
			LittleGameplayTweaks,
			Always
		}

		public static ConfigFile ConfigFileSTAGES = new ConfigFile(Paths.ConfigPath + "\\Wolfo.LoopVariants.cfg", true);

		public static ConfigEntry<bool> cfgLoopWeather;

		public static ConfigEntry<bool> cfgGameplayChanges;

		public static ConfigEntry<EnumEnemyAdds> Monster_Additions;

		public static ConfigEntry<bool> Name_Changes;

		public static ConfigEntry<float> Chance_PreLoop;

		public static ConfigEntry<float> Chance_Loop;

		public static ConfigEntry<float> Chance_Loop_2;

		public static ConfigEntry<bool> Alternate_Chances;

		public static ConfigEntry<bool> LoopVariant_OnPreLoop_Vanilla;

		public static ConfigEntry<bool> PreLoopVariant_PostLoop_Vanilla;

		public static ConfigEntry<bool> MultiplayerTesting;

		public static ConfigEntry<bool> Stage_1_Golem;

		public static ConfigEntry<bool> Stage_1_Roost;

		public static ConfigEntry<bool> Stage_1_Snow;

		public static ConfigEntry<bool> Stage_1_LakesVillageNight;

		public static ConfigEntry<bool> Stage_1_LakesNight;

		public static ConfigEntry<bool> Stage_1_VillageNight;

		public static ConfigEntry<bool> Stage_1_VillageNight_Credits;

		public static ConfigEntry<bool> Stage_2_Goolake;

		public static ConfigEntry<bool> Stage_2_Goolake_River;

		public static ConfigEntry<bool> Stage_2_Goolake_Elders;

		public static ConfigEntry<bool> Stage_2_Swamp;

		public static ConfigEntry<bool> Stage_2_Ancient;

		public static ConfigEntry<bool> Stage_2_Temple;

		public static ConfigEntry<bool> Stage_3_Frozen;

		public static ConfigEntry<bool> Stage_3_Wisp;

		public static ConfigEntry<bool> Stage_3_Sulfur;

		public static ConfigEntry<bool> Stage_3_Sulfur_Hellfire;

		public static ConfigEntry<bool> Stage_3_Sulfur_ExtraLights;

		public static ConfigEntry<bool> Stage_4_Damp_Abyss;

		public static ConfigEntry<bool> Stage_4_Ship;

		public static ConfigEntry<bool> Stage_4_Root_Jungle;

		public static ConfigEntry<bool> Stage_4_Root_Jungle_Fruit;

		public static ConfigEntry<bool> Stage_5_Sky;

		public static ConfigEntry<bool> Stage_5_Helminth;

		public static ConfigEntry<bool> Stage_6_Commencement;

		public static ConfigEntry<bool> Stage_6_Meridian;

		public static ConfigEntry<bool> WIP;

		public static ConfigEntry<bool> Enemy_1_Golem;

		public static ConfigEntry<bool> Enemy_1_Roost;

		public static ConfigEntry<bool> Enemy_1_Snow;

		public static ConfigEntry<bool> Enemy_1_Lakes;

		public static ConfigEntry<bool> Enemy_1_Village;

		public static ConfigEntry<bool> Enemy_2_Goolake;

		public static ConfigEntry<bool> Enemy_2_Swamp;

		public static ConfigEntry<bool> Enemy_2_Ancient;

		public static ConfigEntry<bool> Enemy_2_Temple;

		public static ConfigEntry<bool> Enemy_3_Frozen;

		public static ConfigEntry<bool> Enemy_3_Wisp;

		public static ConfigEntry<bool> Enemy_3_Sulfur;

		public static ConfigEntry<bool> Enemy_4_Damp_Abyss;

		public static ConfigEntry<bool> Enemy_4_Ship;

		public static ConfigEntry<bool> Enemy_4_Root_Jungle;

		public static ConfigEntry<bool> Enemy_5_Sky;

		public static ConfigEntry<bool> Enemy_5_Helminth;

		public static ConfigEntry<bool> Enemy_6_Commencement;

		public static ConfigEntry<bool> Enemy_6_Meridian;

		public static void InitConfig()
		{
			cfgLoopWeather = ConfigFileSTAGES.Bind<bool>("!Main", "Loop Weather for some more stages", true, "Disable the entire mod if false");
			cfgGameplayChanges = ConfigFileSTAGES.Bind<bool>("!Main", "Enable Gameplay changes for Loop Variants", true, "Does not include new gameobjects that might block a path.\nSome changes will not activate if you are already on the stage.\nIf you plan on playing with people that do not have this mod it's better to disable this.\n\nAquaduct : Slowing Tar\nSulfur Pools : Weaker but Lethal Helfire Pods\nSundered Grove : Healing Fruits");
			Monster_Additions = ConfigFileSTAGES.Bind<EnumEnemyAdds>("!Main", "Add monsters to weather variants", EnumEnemyAdds.LittleGameplayTweaks, "Add additional monsters to the spawn pool of variants.\n0 : Disable Enemy Additions entirely.\n1 : Enable if LittleGameplayTweaks mod is installed.\n2 : Always Enable.");
			Monster_Additions.SettingChanged += Monster_Additions_SettingChanged;
			Name_Changes = ConfigFileSTAGES.Bind<bool>("!Main", "Name Changes", true, "Should variants display a different name like official variants.");
			Chance_PreLoop = ConfigFileSTAGES.Bind<float>("Chances", "Loop Weather chance pre-loop", 0f, "% Chance for a loop weather to happen pre-loop\n(Stages 1 - 5)");
			Chance_Loop = ConfigFileSTAGES.Bind<float>("Chances", "Loop Weather chance post-loop", 100f, "% Chance for a loop weather to happen loop 1\n(Stages 6 - 10)");
			Chance_Loop_2 = ConfigFileSTAGES.Bind<float>("Chances", "Loop Weather chance consecutive-loops", 50f, "% Chance for a loop weather to happen loop 2+\n(Stage 11+)\n-1 will just use loop 1 Chance instead");
			Alternate_Chances = ConfigFileSTAGES.Bind<bool>("Chances", "Alternate Chances between loops", true, "Weather sets alternate between loops.\nGo standard, loop, standard, loop.\nIgnores consecutive loop setting.");
			LoopVariant_OnPreLoop_Vanilla = ConfigFileSTAGES.Bind<bool>("Chances", "Apply pre loop chance to official stage variants", true, "Should stage 1 Viscous Falls be allowed if pre-loop chance succeeds.");
			PreLoopVariant_PostLoop_Vanilla = ConfigFileSTAGES.Bind<bool>("Chances", "Apply loop chance to official stage variants", true, "Should stage 6 Shattered Abodes be allowed if post-loop chance fails.");
			MultiplayerTesting = ConfigFileSTAGES.Bind<bool>("Testing", "Multiplayer Testing", false, "Removes kicking from lobbies so you can join yourself with 2 game instances on the same account.");
			WIP = ConfigFileSTAGES.Bind<bool>("Testing", "Wip", false, "Not much to see");
			InitConfigStages();
			RiskConfig();
		}

		private static void Monster_Additions_SettingChanged(object sender, EventArgs e)
		{
			if (Monster_Additions.Value == EnumEnemyAdds.Always)
			{
				LoopVariantsMain.AddMonsters = true;
			}
			else if (Monster_Additions.Value == EnumEnemyAdds.LittleGameplayTweaks)
			{
				LoopVariantsMain.AddMonsters = Chainloader.PluginInfos.ContainsKey("com.Wolfo.LittleGameplayTweaks");
			}
			else if (Monster_Additions.Value == EnumEnemyAdds.Never)
			{
				LoopVariantsMain.AddMonsters = false;
			}
			Debug.Log((object)("Variant Monsters : " + LoopVariantsMain.AddMonsters));
		}

		public static void RiskConfig()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: 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_0082: Expected O, but got Unknown
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected O, but got Unknown
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Expected O, but got Unknown
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Expected O, but got Unknown
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_010b: 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_011d: Expected O, but got Unknown
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Expected O, but got Unknown
			//IL_012f: 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_0141: Expected O, but got Unknown
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Expected O, but got Unknown
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Expected O, but got Unknown
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Expected O, but got Unknown
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Expected O, but got Unknown
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Expected O, but got Unknown
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Expected O, but got Unknown
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Expected O, but got Unknown
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Expected O, but got Unknown
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Expected O, but got Unknown
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Expected O, but got Unknown
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Expected O, but got Unknown
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Expected O, but got Unknown
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Expected O, but got Unknown
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Expected O, but got Unknown
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Expected O, but got Unknown
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Expected O, but got Unknown
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Expected O, but got Unknown
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Expected O, but got Unknown
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Expected O, but got Unknown
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Expected O, but got Unknown
			//IL_0295: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Expected O, but got Unknown
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Expected O, but got Unknown
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Expected O, but got Unknown
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Expected O, but got Unknown
			//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Expected O, but got Unknown
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Expected O, but got Unknown
			//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ff: Expected O, but got Unknown
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Expected O, but got Unknown
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031f: Expected O, but got Unknown
			//IL_0325: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Expected O, but got Unknown
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_033f: Expected O, but got Unknown
			Texture2D val = new Texture2D(256, 256, (TextureFormat)12, false);
			ImageConversion.LoadImage(val, Resources.icon, true);
			((Texture)val).filterMode = (FilterMode)1;
			Sprite modIcon = Sprite.Create(val, new Rect(0f, 0f, 256f, 256f), new Vector2(0.5f, 0.5f));
			ModSettingsManager.SetModIcon(modIcon);
			ModSettingsManager.SetModDescription("Diet Loop Weather Variants for more stages.");
			CheckBoxConfig val2 = new CheckBoxConfig
			{
				name = "Disable Entire Mod",
				restartRequired = true
			};
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgLoopWeather, val2));
			val2 = new CheckBoxConfig
			{
				name = "Gameplay Changes"
			};
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgGameplayChanges, val2));
			ChoiceConfig val3 = new ChoiceConfig
			{
				name = "Add monsters to         weather variants"
			};
			ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)Monster_Additions, val3));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Name_Changes));
			FloatFieldConfig val4 = new FloatFieldConfig
			{
				name = "Chance pre-loop"
			};
			ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(Chance_PreLoop, val4));
			val4 = new FloatFieldConfig
			{
				name = "Chance post-loop"
			};
			ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(Chance_Loop, val4));
			val4 = new FloatFieldConfig
			{
				name = "Chance consecutive-loop"
			};
			ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(Chance_Loop_2, val4));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Alternate_Chances));
			val2 = new CheckBoxConfig
			{
				name = "Chance Based Official Variants Pre-loop"
			};
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(LoopVariant_OnPreLoop_Vanilla, val2));
			val2 = new CheckBoxConfig
			{
				name = "Chance Based Official Variants Post-loop"
			};
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(PreLoopVariant_PostLoop_Vanilla, val2));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_1_Golem));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_1_Snow));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Enemy_1_Snow));
			val2 = new CheckBoxConfig
			{
				name = "Friendly Viscious/Disturbed SpawnPool",
				restartRequired = true
			};
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_1_LakesVillageNight, val2));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_1_VillageNight_Credits));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_2_Goolake));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_2_Goolake_River));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_2_Swamp));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_2_Ancient));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Enemy_2_Ancient));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_2_Temple));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_3_Wisp));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Enemy_3_Wisp));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_3_Sulfur));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_3_Sulfur_Hellfire));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_3_Sulfur_ExtraLights));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_4_Damp_Abyss));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Enemy_4_Damp_Abyss));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_4_Root_Jungle));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Enemy_4_Root_Jungle));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_4_Root_Jungle_Fruit));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_5_Helminth));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Enemy_5_Helminth));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Stage_6_Meridian));
		}

		public static void InitConfigStages()
		{
			Stage_1_Golem = ConfigFileSTAGES.Bind<bool>("Stage 1", "Titanic Plains", true, "Enable alt weather for this stage. Sunset Plains");
			Stage_1_Roost = ConfigFileSTAGES.Bind<bool>("Stage 1", "Distant Roost", true, "Enable alt weather for this stage. WIP/Not implemented");
			Stage_1_Snow = ConfigFileSTAGES.Bind<bool>("Stage 1", "Siphoned Forest", true, "Enable alt weather for this stage. Night Time Aurora Borealis");
			Enemy_1_Snow = ConfigFileSTAGES.Bind<bool>("Stage 1", "Siphoned Forest : Mobs", true, "Add mobs to Variant : Greater Wisps");
			Stage_1_LakesVillageNight = ConfigFileSTAGES.Bind<bool>("Stage 1", "Viscious Falls & Disturbed Impact - Spawn Pool Nerf", true, "Make spawn pools more Stage 1 friendly.\nDisables Elder Lemurian, Void Reavers from spawning here Stage 1.");
			Stage_1_VillageNight_Credits = ConfigFileSTAGES.Bind<bool>("Stage 1", "Disturbed Impact : Credits Nerf", true, "Disturbed Impact has 310 Credits, the highest of any stage 1. This nerfs it to 280 pre loop.");
			Stage_2_Goolake = ConfigFileSTAGES.Bind<bool>("Stage 2", "Abandoned Aquaduct", true, "Enable alt weather for this stage. Tar Filled, Green sick-ish feeling");
			Stage_2_Goolake_River = ConfigFileSTAGES.Bind<bool>("Stage 2", "Abandoned Aquaduct - River of Tar", true, "Enable the Tar River in the alt of this stage");
			Stage_2_Swamp = ConfigFileSTAGES.Bind<bool>("Stage 2", "Wetland Aspect", true, "Enable alt weather for this stage. Foggy and Rainy");
			Stage_2_Ancient = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aphelian Sanctuary", true, "Enable alt weather for this stage. Night Time/Eclipsed Sun");
			Enemy_2_Ancient = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aphelian Sanctuary : Mobs", true, "Add mobs to Variant : Lunar Exploders always, Lunar Golem and Wisp on loops.");
			Stage_2_Temple = ConfigFileSTAGES.Bind<bool>("Stage 2", "Reformed Altar", true, "Enable alt weather for this stage : Golden with Dieback leaves");
			Stage_3_Frozen = ConfigFileSTAGES.Bind<bool>("Stage 3", "Rallypoint Delta", true, "Enable alt weather for this stage WIP/Not Implemented");
			Stage_3_Wisp = ConfigFileSTAGES.Bind<bool>("Stage 3", "Scorched Acres", true, "Enable alt weather for this stage : Dusk");
			Enemy_3_Wisp = ConfigFileSTAGES.Bind<bool>("Stage 3", "Scorched Acres : Mobs", true, "Add mobs to Variant : Child");
			Stage_3_Sulfur = ConfigFileSTAGES.Bind<bool>("Stage 3", "Sulfur Pool", true, "Enable alt weather for this stage: Blue Lava");
			Stage_3_Sulfur_Hellfire = ConfigFileSTAGES.Bind<bool>("Stage 3", "Sulfur Pool : Helfire", true, "Should Sulfur Pods in alt weather do less overall damage but also add lethal helfire.");
			Stage_3_Sulfur_ExtraLights = ConfigFileSTAGES.Bind<bool>("Stage 3", "Sulfur Pool : Reduce Lights", false, "Reduce Light amount on this stage. This might help optimization");
			Stage_4_Damp_Abyss = ConfigFileSTAGES.Bind<bool>("Stage 4", "Abyssal Depths", true, "Enable alt weather for this stage : More Red, vaguely Imp themed");
			Enemy_4_Damp_Abyss = ConfigFileSTAGES.Bind<bool>("Stage 4", "Abyssal Depths : Mobs", true, "Add mobs to Variant : Void Reavers/Barnacles/Imps always, Void Jailer/Devestator/Imp Overlords post-loop");
			Stage_4_Ship = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sirens Call", true, "Enable alt weather for this stage WIP/Not Implemented");
			Stage_4_Root_Jungle = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sundered Grove", true, "Enable alt weather for this stage");
			Enemy_4_Root_Jungle = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sundered Grove : Mobs", true, "Add mobs to Variant : Geep & Gip");
			Stage_4_Root_Jungle_Fruit = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sundered Grove - Healing Fruit", true, "Spawn 30-40 Healing Fruits like the Healing Fruit in Treeborn or Eggs in Sirens Call");
			Stage_5_Sky = ConfigFileSTAGES.Bind<bool>("Stage 5", "Sky Meadow", true, "Enable alt weather for this stage. WIP/Not Implemented");
			Stage_5_Helminth = ConfigFileSTAGES.Bind<bool>("Stage 5", "Helminth Hatchery", true, "Enable alt weather for this stage");
			Enemy_5_Helminth = ConfigFileSTAGES.Bind<bool>("Stage 5", "Helminth Hatchery : Mobs", true, "Add mobs to Variant : Halcyonite");
			Stage_6_Meridian = ConfigFileSTAGES.Bind<bool>("Stage Final", "Prime Meridian", true, "Change trees to Golden Dieback coloration on loops");
		}
	}
	internal static class Files
	{
		public static AssetBundle Bundle;

		public static PluginInfo PluginInfo;

		public static string Folder = "LoopWeather";

		internal static string assemblyDir => Path.GetDirectoryName(PluginInfo.Location);

		internal static void Init(PluginInfo info)
		{
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			PluginInfo = info;
			if (!Directory.Exists(GetPathToFile(Folder)))
			{
				Debug.LogWarning((object)(Folder + " | Folder does not exist"));
				Folder = "plugins\\" + Folder;
				if (!Directory.Exists(GetPathToFile(Folder)))
				{
					Debug.LogWarning((object)(Folder + " | Folder does not exist"));
				}
			}
			if (Directory.Exists(GetPathToFile(Folder + "\\Languages")))
			{
				Language.SetFolders += new hook_SetFolders(SetFolders);
			}
			else
			{
				Debug.LogWarning((object)(Folder + "\\Languages | Folder does not exist"));
			}
			if (Directory.Exists(GetPathToFile(Folder + "\\AssetBundles")))
			{
				Bundle = AssetBundle.LoadFromFile(GetPathToFile(Folder + "\\AssetBundles", "loopvariants"));
			}
			else
			{
				Debug.LogWarning((object)(Folder + "\\AssetBundles | Folder does not exist"));
			}
		}

		private static void SetFolders(orig_SetFolders orig, Language self, IEnumerable<string> newFolders)
		{
			IEnumerable<string> second = Directory.EnumerateDirectories(Path.Combine(GetPathToFile(Folder + "\\Languages")), self.name);
			orig.Invoke(self, newFolders.Union(second));
		}

		internal static string GetPathToFile(string folderName)
		{
			return Path.Combine(assemblyDir, folderName);
		}

		internal static string GetPathToFile(string folderName, string fileName)
		{
			return Path.Combine(assemblyDir, folderName, fileName);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("Wolfo.LoopVariants", "WolfosLoopVariants", "1.4.1")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class LoopVariantsMain : BaseUnityPlugin
	{
		public class SendSyncLoopWeather : ChatMessageBase
		{
			public bool CURRENT;

			public bool NEXT;

			public override string ConstructChatString()
			{
				SyncLoopWeather component = ((Component)Run.instance).GetComponent<SyncLoopWeather>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.CurrentStage_LoopVariant = CURRENT;
					component.NextStage_LoopVariant = NEXT;
					if (!NetworkServer.active)
					{
						component.Applied_To_Stage = false;
						ApplyLoopWeatherChanges(null);
					}
				}
				else
				{
					Debug.LogWarning((object)"Sent SendSyncLoopWeather without SyncLoopWeather");
				}
				return null;
			}

			public override void Serialize(NetworkWriter writer)
			{
				((ChatMessageBase)this).Serialize(writer);
				writer.Write(CURRENT);
				writer.Write(NEXT);
			}

			public override void Deserialize(NetworkReader reader)
			{
				((ChatMessageBase)this).Deserialize(reader);
				CURRENT = reader.ReadBoolean();
				NEXT = reader.ReadBoolean();
			}
		}

		public class SyncLoopWeather : MonoBehaviour
		{
			public bool Applied_To_Stage;

			public bool CurrentStage_LoopVariant;

			public bool NextStage_LoopVariant;
		}

		public static ExpansionDef DLC2 = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC2/Common/DLC2.asset").WaitForCompletion();

		public static Dictionary<string, SceneDef> loopSceneDefToNon = new Dictionary<string, SceneDef>();

		public static List<string> DisabledVariants = new List<string>();

		public static bool AddMonsters = false;

		public static int loopClearCountPlusOne
		{
			get
			{
				if (!Object.op_Implicit((Object)(object)Run.instance))
				{
					return 0;
				}
				return (Run.instance.stageClearCount + 1) / Run.stagesPerLoop;
			}
		}

		public void Awake()
		{
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Expected O, but got Unknown
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected O, but got Unknown
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Expected O, but got Unknown
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Expected O, but got Unknown
			WConfig.InitConfig();
			if (WConfig.cfgLoopWeather.Value)
			{
				Files.Init(((BaseUnityPlugin)this).Info);
				ChatMessageBase.chatMessageTypeToIndex.Add(typeof(SendSyncLoopWeather), (byte)ChatMessageBase.chatMessageIndexToType.Count);
				ChatMessageBase.chatMessageIndexToType.Add(typeof(SendSyncLoopWeather));
				Main_Variants.Start();
				RemoveVariantNames();
				Run.Start += new hook_Start(AddRoll_StartOfRun);
				AssignStageToken.Start += new hook_Start(ApplyLoopNameChanges);
				ClassicStageInfo.Start += new hook_Start(RollForWeather);
				ClassicStageInfo.RebuildCards += new Manipulator(ApplyWeatherWithDCCS);
				Run.PickNextStageScene += new hook_PickNextStageScene(Official_Variants_MainPath);
				SceneExitController.IfLoopedUseValidLoopStage += new hook_IfLoopedUseValidLoopStage(Official_Variants_AltPath);
				BazaarController.IsUnlockedBeforeLooping += new hook_IsUnlockedBeforeLooping(Official_Variants_Bazaar);
			}
		}

		private void RollForWeather(orig_Start orig, ClassicStageInfo self)
		{
			try
			{
				ChooseIfNextStageLoop(send: true);
			}
			catch (Exception ex)
			{
				Debug.LogException(ex);
			}
			orig.Invoke(self);
		}

		public void Start()
		{
			if (WConfig.Monster_Additions.Value == WConfig.EnumEnemyAdds.Always)
			{
				AddMonsters = true;
			}
			else if (WConfig.Monster_Additions.Value == WConfig.EnumEnemyAdds.LittleGameplayTweaks)
			{
				AddMonsters = Chainloader.PluginInfos.ContainsKey("com.Wolfo.LittleGameplayTweaks");
			}
			else if (WConfig.Monster_Additions.Value == WConfig.EnumEnemyAdds.Never)
			{
				AddMonsters = false;
			}
			Debug.Log((object)("Variant Monsters : " + AddMonsters));
		}

		public static bool RollForLoopWeather(SyncLoopWeather weather)
		{
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Invalid comparison between Unknown and I4
			bool flag = false;
			bool flag2 = false;
			if (WConfig.Alternate_Chances.Value)
			{
				if (loopClearCountPlusOne % 2 == 1)
				{
					flag = true;
				}
			}
			else if (WConfig.Chance_Loop_2.Value > 0f && loopClearCountPlusOne > 1)
			{
				flag2 = true;
			}
			else
			{
				flag = loopClearCountPlusOne > 0;
			}
			if ((int)Run.instance.ruleBook.stageOrder == 1)
			{
				flag = Util.CheckRoll(50f, (CharacterMaster)null);
				flag2 = false;
			}
			else if (Object.op_Implicit((Object)(object)weather))
			{
				if (Run.instance.loopClearCount > 1)
				{
					if (WConfig.Chance_Loop_2.Value >= 100f)
					{
						weather.CurrentStage_LoopVariant = true;
					}
					else if (WConfig.Chance_Loop_2.Value == 0f)
					{
						weather.CurrentStage_LoopVariant = false;
					}
				}
				else if (Run.instance.loopClearCount == 1)
				{
					if (WConfig.Chance_Loop.Value >= 100f)
					{
						weather.CurrentStage_LoopVariant = true;
					}
					else if (WConfig.Chance_Loop.Value == 0f)
					{
						weather.CurrentStage_LoopVariant = false;
					}
				}
				else if (WConfig.Chance_PreLoop.Value >= 100f)
				{
					weather.CurrentStage_LoopVariant = true;
				}
				else if (WConfig.Chance_PreLoop.Value == 0f)
				{
					weather.CurrentStage_LoopVariant = false;
				}
			}
			if (flag2)
			{
				return Util.CheckRoll(WConfig.Chance_Loop_2.Value, (CharacterMaster)null);
			}
			if (flag)
			{
				return Util.CheckRoll(WConfig.Chance_Loop.Value, (CharacterMaster)null);
			}
			return Util.CheckRoll(WConfig.Chance_PreLoop.Value, (CharacterMaster)null);
		}

		private void ApplyWeatherWithDCCS(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.ClassicStageInfo", "modifiableMonsterCategories")
			}))
			{
				Debug.Log((object)val);
				val.EmitDelegate<Func<DirectorCardCategorySelection, DirectorCardCategorySelection>>((Func<DirectorCardCategorySelection, DirectorCardCategorySelection>)delegate(DirectorCardCategorySelection dccs)
				{
					ApplyLoopWeatherChanges(dccs);
					return dccs;
				});
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: AddVariantExclusiveMonsters");
			}
		}

		private void ApplyAndRollOnStage(SceneDirector obj)
		{
			if (NetworkServer.active)
			{
				ChooseIfNextStageLoop(send: true);
				ApplyLoopWeatherChanges(null);
			}
		}

		private bool Official_Variants_Bazaar(orig_IsUnlockedBeforeLooping orig, BazaarController self, SceneDef sceneDef)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			if (Object.op_Implicit((Object)(object)Run.instance))
			{
				SyncLoopWeather component = ((Component)Run.instance).GetComponent<SyncLoopWeather>();
				if ((int)Run.instance.ruleBook.stageOrder == 0)
				{
					if (component.NextStage_LoopVariant)
					{
						if (Run.instance.stageClearCount < 5 && WConfig.LoopVariant_OnPreLoop_Vanilla.Value)
						{
							return true;
						}
					}
					else if (Run.instance.stageClearCount > 4 && WConfig.PreLoopVariant_PostLoop_Vanilla.Value)
					{
						return false;
					}
				}
			}
			return orig.Invoke(self, sceneDef);
		}

		private static void ApplyLoopWeatherChanges(DirectorCardCategorySelection dccs)
		{
			if (!Object.op_Implicit((Object)(object)Run.instance))
			{
				return;
			}
			SyncLoopWeather component = ((Component)Run.instance).GetComponent<SyncLoopWeather>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				Debug.LogWarning((object)"No Weather Data");
				return;
			}
			if (component.Applied_To_Stage)
			{
				Debug.Log((object)"Already applied weather this stage");
				return;
			}
			Debug.Log((object)("Loop weather for curr " + component.CurrentStage_LoopVariant));
			Debug.Log((object)("Loop weather for next " + component.NextStage_LoopVariant));
			if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.mixEnemyArtifactDef))
			{
				dccs = null;
			}
			if (Object.op_Implicit((Object)(object)dccs) && dccs is FamilyDirectorCardCategorySelection)
			{
				dccs = null;
			}
			if (!component.CurrentStage_LoopVariant)
			{
				return;
			}
			Debug.Log((object)("Applying Weather for : " + SceneCatalog.mostRecentSceneDef.baseSceneName + " \n" + (object)dccs));
			component.Applied_To_Stage = true;
			try
			{
				switch (SceneInfo.instance.sceneDef.baseSceneName)
				{
				case "golemplains":
					if (WConfig.Stage_1_Golem.Value)
					{
						Variants_1_GolemPlains.LoopWeather();
					}
					break;
				case "blackbeach":
					if (WConfig.WIP.Value)
					{
						Variants_1_BlackBeach.LoopWeather();
					}
					break;
				case "snowyforest":
					if (WConfig.Stage_1_Snow.Value)
					{
						Variants_1_SnowyForest.LoopWeather();
						if (WConfig.Enemy_1_Snow.Value)
						{
							Variants_1_SnowyForest.AddVariantMonsters(dccs);
						}
					}
					break;
				case "lakesnight":
					if (WConfig.Stage_1_LakesVillageNight.Value)
					{
						LakesNightVillageNight.LakesNight_AddStage1FriendlyMonsters(dccs);
					}
					break;
				case "villagenight":
					if (WConfig.Stage_1_LakesVillageNight.Value)
					{
						LakesNightVillageNight.VillageNight_AddStage1FriendlyMonsters(dccs);
					}
					if (WConfig.Stage_1_VillageNight_Credits.Value && loopClearCountPlusOne < 1)
					{
						ClassicStageInfo instance = ClassicStageInfo.instance;
						instance.sceneDirectorInteractibleCredits -= 30;
					}
					break;
				case "goolake":
					if (WConfig.Stage_2_Goolake.Value)
					{
						Variants_2_Goolake.LoopWeather();
					}
					break;
				case "foggyswamp":
					if (WConfig.Stage_2_Swamp.Value)
					{
						Variants_2_FoggySwamp.LoopWeather();
					}
					break;
				case "ancientloft":
					if (WConfig.Stage_2_Ancient.Value)
					{
						Variants_2_AncientLoft.LoopWeather();
						if (WConfig.Enemy_2_Ancient.Value)
						{
							Variants_2_AncientLoft.AddVariantMonsters(dccs);
						}
					}
					break;
				case "lemuriantemple":
					if (WConfig.Stage_2_Temple.Value)
					{
						Variants_2_LemurianTemple.LoopWeather();
					}
					break;
				case "frozenwall":
					if (WConfig.WIP.Value)
					{
						Variants_3_FrozenWall.LoopWeather();
					}
					break;
				case "wispgraveyard":
					if (WConfig.Stage_3_Wisp.Value)
					{
						Variants_3_WispGraveyard.LoopWeather();
						if (WConfig.Enemy_3_Wisp.Value)
						{
							Variants_3_WispGraveyard.AddVariantMonsters(dccs);
						}
					}
					break;
				case "sulfurpools":
					if (WConfig.Stage_3_Sulfur.Value)
					{
						Variants_3_Sulfur.LoopWeather();
					}
					break;
				case "dampcavesimple":
					if (WConfig.Stage_4_Damp_Abyss.Value)
					{
						Variants_4_DampCaveSimpleAbyss.LoopWeather();
						if (WConfig.Enemy_4_Damp_Abyss.Value)
						{
							Variants_4_DampCaveSimpleAbyss.AddVariantMonsters(dccs);
						}
					}
					break;
				case "shipgraveyard":
					if (WConfig.WIP.Value)
					{
						Variants_4_ShipGraveyard.LoopWeather();
					}
					break;
				case "rootjungle":
					if (WConfig.Stage_4_Root_Jungle.Value)
					{
						Variants_4_RootJungle.LoopWeather();
						if (WConfig.Enemy_4_Root_Jungle.Value)
						{
							Variants_4_RootJungle.AddVariantMonsters(dccs);
						}
					}
					break;
				case "skymeadow":
					if (WConfig.WIP.Value)
					{
						Variants_5_SkyMeadow.LoopWeather();
					}
					break;
				case "helminthroost":
					if (WConfig.Stage_5_Helminth.Value)
					{
						Variants_5_HelminthRoost.LoopWeather();
						if (WConfig.Enemy_5_Helminth.Value)
						{
							Variants_5_HelminthRoost.AddVariantMonsters(dccs);
						}
					}
					break;
				case "moon2":
					if (WConfig.WIP.Value)
					{
						Variants_6_Moon.LoopWeather();
					}
					break;
				case "meridian":
					if (WConfig.Stage_6_Meridian.Value)
					{
						Variants_6_Meridian.LoopWeather();
					}
					break;
				}
			}
			catch (Exception ex)
			{
				Debug.LogWarning((object)("LoopVariants Error: " + ex));
			}
		}

		private void Official_Variants_MainPath(orig_PickNextStageScene orig, Run self, WeightedSelection<SceneDef> choices)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Invalid comparison between Unknown and I4
			orig.Invoke(self, choices);
			SyncLoopWeather component = ((Component)Run.instance).GetComponent<SyncLoopWeather>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				Debug.LogWarning((object)"SyncLoopWeather wasn't added when the run started, How?");
			}
			else
			{
				if (!NetworkServer.active || (int)self.ruleBook.stageOrder != 0)
				{
					return;
				}
				if (component.NextStage_LoopVariant)
				{
					if (self.stageClearCount < 5 && WConfig.LoopVariant_OnPreLoop_Vanilla.Value && Object.op_Implicit((Object)(object)self.nextStageScene) && Object.op_Implicit((Object)(object)self.nextStageScene.loopedSceneDef) && self.IsExpansionEnabled(self.nextStageScene.loopedSceneDef.requiredExpansion))
					{
						Debug.Log((object)("Replacing " + ((object)self.nextStageScene)?.ToString() + " with " + (object)self.nextStageScene.loopedSceneDef));
						self.nextStageScene = self.nextStageScene.loopedSceneDef;
					}
				}
				else if (self.stageClearCount > 4 && WConfig.PreLoopVariant_PostLoop_Vanilla.Value && loopSceneDefToNon.ContainsKey(self.nextStageScene.baseSceneName))
				{
					SceneDef val = loopSceneDefToNon[self.nextStageScene.baseSceneName];
					if ((Object)(object)val != (Object)null)
					{
						Debug.Log((object)("Replacing " + ((object)self.nextStageScene)?.ToString() + " with " + (object)val));
						self.nextStageScene = val;
					}
				}
			}
		}

		private SceneDef Official_Variants_AltPath(orig_IfLoopedUseValidLoopStage orig, SceneExitController self, SceneDef sceneDef)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Invalid comparison between Unknown and I4
			if (NetworkServer.active)
			{
				SyncLoopWeather component = ((Component)Run.instance).GetComponent<SyncLoopWeather>();
				if ((int)Run.instance.ruleBook.stageOrder == 0)
				{
					if (component.NextStage_LoopVariant)
					{
						if (Run.instance.stageClearCount < 5 && WConfig.LoopVariant_OnPreLoop_Vanilla.Value && Object.op_Implicit((Object)(object)sceneDef.loopedSceneDef))
						{
							Debug.Log((object)("Replacing " + ((object)sceneDef)?.ToString() + " with " + (object)sceneDef.loopedSceneDef));
							return sceneDef.loopedSceneDef;
						}
					}
					else if (Run.instance.stageClearCount > 4 && WConfig.PreLoopVariant_PostLoop_Vanilla.Value && loopSceneDefToNon.ContainsKey(sceneDef.baseSceneName))
					{
						Debug.Log((object)("Replacing " + ((object)sceneDef.loopedSceneDef)?.ToString() + " with " + (object)sceneDef));
						return sceneDef;
					}
				}
			}
			return orig.Invoke(self, sceneDef);
		}

		private void AddRoll_StartOfRun(orig_Start orig, Run self)
		{
			if (!Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponent<SyncLoopWeather>()))
			{
				((Component)self).gameObject.AddComponent<SyncLoopWeather>();
			}
			if (NetworkServer.active)
			{
				ChooseIfNextStageLoop(send: false);
			}
			orig.Invoke(self);
		}

		public static void ChooseIfNextStageLoop(bool send)
		{
			if (!NetworkServer.active)
			{
				return;
			}
			if (!Object.op_Implicit((Object)(object)Run.instance))
			{
				Debug.LogWarning((object)"Called without a Run Instance");
				return;
			}
			SyncLoopWeather syncLoopWeather = ((Component)Run.instance).GetComponent<SyncLoopWeather>();
			if (!Object.op_Implicit((Object)(object)syncLoopWeather))
			{
				Debug.LogWarning((object)"SyncLoopWeather wasn't added when the run started, How?");
				syncLoopWeather = ((Component)Run.instance).gameObject.AddComponent<SyncLoopWeather>();
			}
			syncLoopWeather.Applied_To_Stage = false;
			syncLoopWeather.CurrentStage_LoopVariant = syncLoopWeather.NextStage_LoopVariant;
			bool nEXT = (syncLoopWeather.NextStage_LoopVariant = RollForLoopWeather(syncLoopWeather));
			if (send)
			{
				Chat.SendBroadcastChat((ChatMessageBase)(object)new SendSyncLoopWeather
				{
					CURRENT = syncLoopWeather.CurrentStage_LoopVariant,
					NEXT = nEXT
				});
			}
		}

		public static void RemoveVariantNames()
		{
			if (!WConfig.Stage_1_Golem.Value)
			{
				DisabledVariants.Add("golemplains");
			}
			if (WConfig.Stage_1_Roost != null && !WConfig.Stage_1_Roost.Value)
			{
				DisabledVariants.Add("blackbeach");
			}
			if (!WConfig.Stage_1_Snow.Value)
			{
				DisabledVariants.Add("snowyforest");
			}
			if (!WConfig.Stage_2_Goolake.Value)
			{
				DisabledVariants.Add("goolake");
			}
			if (!WConfig.Stage_2_Swamp.Value)
			{
				DisabledVariants.Add("foggyswamp");
			}
			if (!WConfig.Stage_2_Ancient.Value)
			{
				DisabledVariants.Add("ancientloft");
			}
			if (!WConfig.Stage_2_Temple.Value)
			{
				DisabledVariants.Add("lemuriantemple");
			}
			if (WConfig.Stage_3_Frozen != null && !WConfig.Stage_3_Frozen.Value)
			{
				DisabledVariants.Add("frozenwall");
			}
			if (!WConfig.Stage_3_Wisp.Value)
			{
				DisabledVariants.Add("wispgraveyard");
			}
			if (!WConfig.Stage_3_Sulfur.Value)
			{
				DisabledVariants.Add("sulfurpools");
			}
			if (!WConfig.Stage_4_Damp_Abyss.Value)
			{
				DisabledVariants.Add("dampcavesimple");
			}
			if (WConfig.Stage_4_Ship != null && !WConfig.Stage_4_Ship.Value)
			{
				DisabledVariants.Add("shipgraveyard");
			}
			if (!WConfig.Stage_4_Root_Jungle.Value)
			{
				DisabledVariants.Add("rootjungle");
			}
			if (WConfig.Stage_5_Sky != null && !WConfig.Stage_5_Sky.Value)
			{
				DisabledVariants.Add("skymeadow");
			}
			if (!WConfig.Stage_5_Helminth.Value)
			{
				DisabledVariants.Add("helminthroost");
			}
			if (WConfig.Stage_6_Commencement != null && !WConfig.Stage_6_Commencement.Value)
			{
				DisabledVariants.Add("moon2");
			}
			if (!WConfig.Stage_6_Meridian.Value)
			{
				DisabledVariants.Add("meridian");
			}
		}

		private static void ApplyLoopNameChanges(orig_Start orig, AssignStageToken self)
		{
			orig.Invoke(self);
			if (!WConfig.Name_Changes.Value || !Object.op_Implicit((Object)(object)Run.instance))
			{
				return;
			}
			SyncLoopWeather component = ((Component)Run.instance).GetComponent<SyncLoopWeather>();
			if (Object.op_Implicit((Object)(object)component) && component.CurrentStage_LoopVariant)
			{
				SceneDef mostRecentSceneDef = SceneCatalog.mostRecentSceneDef;
				Language val = Language.FindLanguageByName("en");
				if (val.stringsByToken.ContainsKey(mostRecentSceneDef.nameToken + "_LOOP") && !DisabledVariants.Contains(mostRecentSceneDef.baseSceneName))
				{
					((TMP_Text)self.titleText).SetText(Language.GetString(mostRecentSceneDef.nameToken + "_LOOP"), true);
					((TMP_Text)self.subtitleText).SetText(Language.GetString(mostRecentSceneDef.subtitleToken + "_LOOP"), true);
				}
			}
		}
	}
	public class Main_Variants
	{
		public static void Start()
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: 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_010e: Expected O, but got Unknown
			Variants_1_GolemPlains.Setup();
			Variants_1_BlackBeach.Setup();
			Variants_1_SnowyForest.Setup();
			Variants_2_Goolake.Setup();
			Variants_2_FoggySwamp.Setup();
			Variants_2_AncientLoft.Setup();
			Variants_2_LemurianTemple.Setup();
			Variants_3_FrozenWall.Setup();
			Variants_3_WispGraveyard.Setup();
			Variants_3_Sulfur.Setup();
			Variants_4_DampCaveSimpleAbyss.Setup();
			Variants_4_ShipGraveyard.Setup();
			Variants_4_RootJungle.Setup();
			Variants_5_SkyMeadow.Setup();
			Variants_5_HelminthRoost.Setup();
			Variants_6_Meridian.Setup();
			Variants_6_Moon.Setup();
			if (WConfig.Stage_1_LakesVillageNight.Value)
			{
				LakesNightVillageNight.EditDccs();
			}
			SceneDef value = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/lakes/lakes.asset").WaitForCompletion();
			SceneDef value2 = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/village/village.asset").WaitForCompletion();
			SceneDef value3 = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/habitat/habitat.asset").WaitForCompletion();
			LoopVariantsMain.loopSceneDefToNon.Add("lakesnight", value);
			LoopVariantsMain.loopSceneDefToNon.Add("villagenight", value2);
			LoopVariantsMain.loopSceneDefToNon.Add("habitatfall", value3);
			if (WConfig.MultiplayerTesting.Value)
			{
				ServerAuthManager.HandleSetClientAuth += new hook_HandleSetClientAuth(ServerAuthManager_HandleSetClientAuth);
				UnusedStages();
			}
		}

		public static void LoadStuff()
		{
			//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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: 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_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: 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_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: 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_0115: Unknown result type (might be due to invalid IL or missing references)
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/Skyboxes/matSkybox1.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Junk/slice1/matSkybox2.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/bazaar/matSkybox4.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/Skyboxes/matSkyboxFoggy.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/arena/matSkyboxArena.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/artifactworld/matSkyboxArtifactWorld.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/golemplains/matSkyboxGolemplainsFoggy.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/snowyforest/matSkyboxSF.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/goolake/matSkyboxGoolake.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/ancientloft/matSkyboxAncientLoft.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/sulfurpools/matSkyboxSP.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/frozenwall/matSkyboxFrozenwallNight.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/moon2/matSkyboxMoon.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/goldshores/matSkyboxGoldshores.mat").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneGolemplainsTrailer.asset").WaitForCompletion();
		}

		public static void UnusedStages()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: 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_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			SceneDef val = ScriptableObject.CreateInstance<SceneDef>();
			val.sceneAddress = new AssetReferenceScene("31b8f728a914c9a4faa3df76d1bc0c0e");
			val.cachedName = "golemplains_trailer";
			val.nameToken = "Trailer Plains";
			val.shouldIncludeInLogbook = false;
			ContentAddition.AddSceneDef(val);
			val = ScriptableObject.CreateInstance<SceneDef>();
			val.sceneAddress = new AssetReferenceScene("b30e537b28c514b4a99227ab56a3e1d3");
			val.cachedName = "ItemLogBookPositionalOffsets";
			val.nameToken = "ItemLogBookPositionalOffsets";
			val.shouldIncludeInLogbook = false;
			ContentAddition.AddSceneDef(val);
			val = ScriptableObject.CreateInstance<SceneDef>();
			val.sceneAddress = new AssetReferenceScene("722873b571c73734c8572658dbb8f0db");
			val.cachedName = "renderitem";
			val.nameToken = "renderitem";
			val.shouldIncludeInLogbook = false;
			ContentAddition.AddSceneDef(val);
			val = ScriptableObject.CreateInstance<SceneDef>();
			val.sceneAddress = new AssetReferenceScene("835344f0a7461cc4b8909469b31a3ccc");
			val.cachedName = "slice2";
			val.nameToken = "slice2";
			val.shouldIncludeInLogbook = false;
			ContentAddition.AddSceneDef(val);
			val = ScriptableObject.CreateInstance<SceneDef>();
			val.sceneAddress = new AssetReferenceScene("5d8ea33392b43b94daac86dcf06740ab");
			val.cachedName = "space";
			val.nameToken = "space";
			val.shouldIncludeInLogbook = false;
			ContentAddition.AddSceneDef(val);
			val = ScriptableObject.CreateInstance<SceneDef>();
			val.sceneAddress = new AssetReferenceScene("db3348f5ee64faa48b2c14c3c52d5186");
			val.cachedName = "stage1";
			val.nameToken = "stage1";
			val.shouldIncludeInLogbook = false;
			ContentAddition.AddSceneDef(val);
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneBlackbeach_Eclipse.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneBlackbeach.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneDampcave.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneEclipseClose.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneEclipseStandard.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneGoldshores.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneGolemplains.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneMoonFoggy.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneWispGraveyardSoot.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneRootJungleClear.asset").WaitForCompletion();
			Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneRootJungleRain.asset").WaitForCompletion();
		}

		public static int FindSpawnCard(DirectorCard[] insert, string LookingFor)
		{
			for (int i = 0; i < insert.Length; i++)
			{
				if (((Object)insert[i].spawnCard).name.EndsWith(LookingFor))
				{
					return i;
				}
			}
			Debug.LogWarning((object)("Couldn't find " + LookingFor));
			return -1;
		}

		private static void ServerAuthManager_HandleSetClientAuth(orig_HandleSetClientAuth orig, NetworkMessage netMsg)
		{
		}
	}
	public class Variants_1_BlackBeach
	{
		public static void Setup()
		{
		}

		public static void LoopWeather()
		{
			//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)
			((Component)SceneInfo.instance).GetComponent<PostProcessVolume>().profile = Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneShipgraveyard.asset").WaitForCompletion();
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class Variants_3_FrozenWall
	{
		public static PostProcessProfile ppFrozenWallDay;

		public static void Setup()
		{
			//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_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			ppFrozenWallDay = Object.Instantiate<PostProcessProfile>(Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneFrozenwallNight.asset").WaitForCompletion());
			PostProcessProfile val = Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/DLC1/snowyforest/ppSceneSnowyForest.asset").WaitForCompletion();
			ppFrozenWallDay = Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/DLC1/snowyforest/ppSceneSnowyForest.asset").WaitForCompletion();
		}

		public static void LoopWeather()
		{
			PostProcessVolume component = ((Component)SceneInfo.instance).gameObject.GetComponent<PostProcessVolume>();
			component.profile = ppFrozenWallDay;
			GameObject val = GameObject.Find("/HOLDER: Skybox");
			Transform child = val.transform.GetChild(0);
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class Variants_6_Moon
	{
		public static void Setup()
		{
		}

		public static void LoopWeather()
		{
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class Variants_4_ShipGraveyard
	{
		public static void Setup()
		{
		}

		public static void LoopWeather()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0099: 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_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.Find("/Weather, Shipgraveyard");
			Light component = ((Component)val.transform.GetChild(0)).GetComponent<Light>();
			component.color = new Color(0.9f, 0.62f, 0.62f, 1f);
			PostProcessVolume component2 = ((Component)val.transform.GetChild(2)).GetComponent<PostProcessVolume>();
			RampFog val2 = (RampFog)Object.Instantiate<PostProcessEffectSettings>(component2.profile.settings[0]);
			component2.profile.settings[0] = (PostProcessEffectSettings)(object)val2;
			((ParameterOverride<Color>)(object)val2.fogColorEnd).value = new Color(0.63f, 0.46f, 0.46f, 1f);
			((ParameterOverride<Color>)(object)val2.fogColorMid).value = new Color(0.48f, 0.29f, 0.29f, 0.51f);
			((ParameterOverride<Color>)(object)val2.fogColorStart).value = new Color(0.45f, 0.38f, 0.38f, 0f);
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class Variants_5_SkyMeadow
	{
		public static void Setup()
		{
		}

		public static void LoopWeather()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.Find("/HOLDER: Weather Set 1");
			val.SetActive(false);
			GameObject val2 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/lakesnight/Weather, Lakesnight.prefab").WaitForCompletion());
			Light component = ((Component)val2.transform.GetChild(1)).GetComponent<Light>();
			component.color = new Color(0.9149f, 0.5961f, 0.9333f, 1f);
			component.shadowStrength *= 0.5f;
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class Variants_1_GolemPlains
	{
		public static void Setup()
		{
		}

		public static void LoopWeather()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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_014c: 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_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.Find("/Weather, Golemplains");
			PostProcessVolume component = ((Component)val.transform.GetChild(2)).gameObject.GetComponent<PostProcessVolume>();
			PostProcessProfile sharedProfile = (component.profile = Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneGolemplainsTrailer.asset").WaitForCompletion());
			component.sharedProfile = sharedProfile;
			Light component2 = ((Component)val.transform.GetChild(1)).gameObject.GetComponent<Light>();
			component2.color = new Color(1f, 0.5329f, 0f, 1f);
			component2.intensity = 1.14f;
			if (SceneInfo.instance.sceneDef.cachedName.EndsWith("2"))
			{
				component2.shadowStrength *= 0.4f;
				((Component)component2).gameObject.transform.localEulerAngles = new Vector3(54f, 80f, 150f);
			}
			else
			{
				component2.shadowStrength *= 0.6f;
				((Component)component2).gameObject.transform.localEulerAngles = new Vector3(42.6938f, 140.2757f, 150.3377f);
			}
			SetAmbientLight val3 = val.AddComponent<SetAmbientLight>();
			val3.setAmbientLightColor = true;
			val3.ambientMode = (AmbientMode)3;
			val3.ambientSkyColor = new Color(0.4191f, 0.305f, 0.7264f, 0f);
			val3.ambientEquatorColor = new Color(0.114f, 0.125f, 0.133f, 1f);
			val3.ambientGroundColor = new Color(0.047f, 0.043f, 0.035f, 1f);
			val3.ambientIntensity = 1f;
			val3.setSkyboxMaterial = true;
			val3.skyboxMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/bazaar/matSkybox4.mat").WaitForCompletion();
			val3.ApplyLighting();
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class LakesNightVillageNight
	{
		public static void EditDccs()
		{
			//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_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_0033: 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)
			DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC2/lakesnight/dccsLakesnightMonsters.asset").WaitForCompletion();
			DirectorCardCategorySelection val2 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC2/villagenight/dccsVillageNightMonsters.asset").WaitForCompletion();
			DirectorCardCategorySelection val3 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC2/lakesnight/dccsLakesnightInteractables.asset").WaitForCompletion();
			DirectorCardCategorySelection val4 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC2/villagenight/dccsVillagenightInteractablesDLC2.asset").WaitForCompletion();
			try
			{
				val.categories[0].cards[4].minimumStageCompletions = 2;
				val.categories[1].cards[2].minimumStageCompletions = 2;
				val.categories[1].cards[3].minimumStageCompletions = 4;
				val2.categories[1].cards[2].minimumStageCompletions = 2;
				val4.categories[2].cards[2].minimumStageCompletions = 1;
				val4.categories[5].cards[3].minimumStageCompletions = 1;
				val3.categories[8].cards[0].minimumStageCompletions = 1;
			}
			catch (Exception ex)
			{
				Debug.LogWarning((object)"Some dude edited LakesVillageNight");
				Debug.LogWarning((object)ex);
			}
		}

		public static void LakesNight_AddStage1FriendlyMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}

		public static void VillageNight_AddStage1FriendlyMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class Variants_1_SnowyForest
	{
		public static void Setup()
		{
		}

		public static void LoopWeather()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Expected O, but got Unknown
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.Find("/HOLDER: Skybox");
			Light component = ((Component)val.transform.GetChild(1)).GetComponent<Light>();
			component.color = new Color(0.6667f, 0.9373f, 0.8f, 1f);
			component.intensity = 0.7f;
			PostProcessVolume component2 = ((Component)SceneInfo.instance).gameObject.GetComponent<PostProcessVolume>();
			PostProcessProfile val2 = Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/DLC2/villagenight/ppSceneLVnight.asset").WaitForCompletion();
			PostProcessProfile val3 = Object.Instantiate<PostProcessProfile>(val2);
			RampFog val4 = (RampFog)Object.Instantiate<PostProcessEffectSettings>(val3.settings[0]);
			((ParameterOverride<Color>)(object)val4.fogColorStart).value = ((Color)(ref ((ParameterOverride<Color>)(object)val4.fogColorStart).value)).AlphaMultiplied(0.8f);
			FloatParameter fogIntensity = val4.fogIntensity;
			((ParameterOverride<float>)(object)fogIntensity).value = ((ParameterOverride<float>)(object)fogIntensity).value * 1.2f;
			FloatParameter skyboxStrength = val4.skyboxStrength;
			((ParameterOverride<float>)(object)skyboxStrength).value = ((ParameterOverride<float>)(object)skyboxStrength).value * 0.33f;
			val3.settings[0] = (PostProcessEffectSettings)(object)val4;
			component2.profile = val3;
			component2.sharedProfile = val3;
			component2 = ((Component)val.transform.GetChild(2)).GetComponent<PostProcessVolume>();
			((Behaviour)component2).enabled = false;
			Transform child = val.transform.GetChild(8);
			SetAmbientLight val5 = ((Component)SceneInfo.instance).gameObject.AddComponent<SetAmbientLight>();
			val5.setAmbientLightColor = true;
			val5.ambientMode = (AmbientMode)3;
			val5.ambientGroundColor = new Color(0.1407f, 0.2235f, 0.1392f, 0.5f) * 1.4f;
			val5.ambientEquatorColor = new Color(0.0521f, 0.0804f, 0.049f, 0.5f) * 1.4f;
			val5.ambientSkyColor = new Color(0.2796f, 0.3443f, 0.2745f, 0.5f) * 1.4f;
			val5.ambientIntensity = 1.2f;
			val5.setSkyboxMaterial = true;
			val5.skyboxMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Junk/slice1/matSkybox2.mat").WaitForCompletion();
			val5.ApplyLighting();
			GameObject val6 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/meridian/EventClearedVFX.prefab").WaitForCompletion();
			Mesh mesh = Addressables.LoadAssetAsync<Mesh>((object)"RoR2/DLC1/snowyforest/mdlSnowyForestAurora.fbx").WaitForCompletion();
			GameObject val7 = Object.Instantiate<GameObject>(val6);
			((Component)val7.transform.GetChild(0)).gameObject.SetActive(false);
			((Component)val7.transform.GetChild(1)).GetComponent<MeshFilter>().mesh = mesh;
			((Component)val7.transform.GetChild(2)).GetComponent<MeshFilter>().mesh = mesh;
			((Component)val7.transform.GetChild(3)).GetComponent<MeshFilter>().mesh = mesh;
			val7.transform.localScale = new Vector3(0.22f, 0.22f, 0.22f);
			val7.transform.localPosition = new Vector3(-106.9092f, 50f, -141.4909f);
			val7.transform.localEulerAngles = new Vector3(0f, 15f, 0f);
			GameObject val8 = Object.Instantiate<GameObject>(val7);
			GameObject val9 = Object.Instantiate<GameObject>(val7);
			val8.transform.SetParent(val7.transform);
			val9.transform.SetParent(val7.transform);
			val8.transform.localPosition = new Vector3(4f, -4f, 4f);
			val8.transform.localScale = new Vector3(1f, 1f, 1f);
			val8.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			val9.transform.localPosition = new Vector3(-4f, 4f, -4f);
			val9.transform.localScale = new Vector3(1f, 1f, 1f);
			val9.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			val7 = Object.Instantiate<GameObject>(val7);
			val7.transform.localScale = new Vector3(-0.22f, 0.22f, -0.22f);
			val7.transform.localPosition = new Vector3(-204.8727f, 50f, -160.3091f);
			val7.transform.localEulerAngles = new Vector3(0f, 26f, 0f);
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: 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_0039: 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_0047: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
				DirectorCard val = new DirectorCard
				{
					spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/GreaterWisp/cscGreaterWisp.asset").WaitForCompletion(),
					selectionWeight = 1,
					preventOverhead = true,
					minimumStageCompletions = 4,
					spawnDistance = (MonsterSpawnDistance)0
				};
				dccs.AddCard(1, val);
			}
		}
	}
	public class Variants_2_AncientLoft
	{
		public static Material matAncientLoft_SunCloud;

		public static Material matAncientLoft_CloudFloor;

		public static Material matAncientLoftDeepFog;

		public static Material matAncientLoft_Cloud;

		public static Material matAncientLoft_Water;

		public static Material matAncientLoftEndlessHole;

		public static Material matEclipseMoon;

		public static void Setup()
		{
			//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_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: 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_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: 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_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: 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)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			matAncientLoft_CloudFloor = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/ancientloft/matAncientLoft_CloudFloor.mat").WaitForCompletion());
			matAncientLoft_CloudFloor.SetColor("_TintColor", new Color(0.03f, 0.07f, 0.16f, 1f));
			matAncientLoftDeepFog = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/ancientloft/matAncientLoftDeepFog.mat").WaitForCompletion());
			matAncientLoftDeepFog.SetColor("_TintColor", new Color(0.03f, 0.05f, 0.07f, 1f));
			matAncientLoft_Cloud = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/ancientloft/matAncientLoft_Cloud.mat").WaitForCompletion());
			matAncientLoft_Cloud.SetColor("_TintColor", new Color(0.07f, 0.18f, 0.32f, 1f));
			matAncientLoft_SunCloud = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/ancientloft/matAncientLoft_SunCloud.mat").WaitForCompletion());
			matAncientLoft_SunCloud.SetTexture("_RemapTex", matAncientLoft_CloudFloor.GetTexture("_RemapTex"));
			matAncientLoft_SunCloud.SetColor("_TintColor", new Color(0f, 0.4f, 0.5f, 0.4f));
			matAncientLoft_Water = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/ancientloft/matAncientLoft_Water.mat").WaitForCompletion());
			matAncientLoft_Water.SetTexture("_Cube", (Texture)null);
			matAncientLoftEndlessHole = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/ancientloft/matAncientLoftEndlessHole.mat").WaitForCompletion());
			matAncientLoftEndlessHole.SetColor("_TintColor", new Color(0.03f, 0.05f, 0.08f, 1f));
			matEclipseMoon = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/eclipseworld/matEclipseMoon.mat").WaitForCompletion());
		}

		public static void LoopWeather()
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: 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_0119: 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)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.Find("/HOLDER: Terrain/AL_Sun");
			val.SetActive(false);
			GameObject val2 = GameObject.Find("/Weather, AncientLoft");
			((Behaviour)((Component)val2.transform.GetChild(1)).GetComponent<Light>()).enabled = false;
			((Component)val2.transform.GetChild(2)).gameObject.SetActive(false);
			GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/eclipseworld/Weather, Eclipse.prefab").WaitForCompletion();
			GameObject val4 = Object.Instantiate<GameObject>(((Component)val3.transform.GetChild(3).GetChild(2)).gameObject);
			GameObject val5 = Object.Instantiate<GameObject>(val3);
			Light component = ((Component)val5.transform.GetChild(1)).GetComponent<Light>();
			component.shadowStrength = 0.5f;
			SetAmbientLight component2 = ((Component)val5.transform.GetChild(2)).GetComponent<SetAmbientLight>();
			component2.ambientIntensity = 0.6f;
			component2.ApplyLighting();
			val4.gameObject.SetActive(true);
			val4.transform.GetChild(0).localEulerAngles = new Vector3(0f, 0f, 0f);
			val4.transform.localPosition = new Vector3(-1800f, 360f, 310f);
			val4.transform.localEulerAngles = new Vector3(0f, 100f, 0f);
			val4.transform.localScale = new Vector3(420f, 420f, 420f);
			((Renderer)val4.GetComponent<MeshRenderer>()).material = matEclipseMoon;
			Object.Instantiate<GameObject>(((Component)val2.transform.GetChild(1)).gameObject);
			GameObject val6 = GameObject.Find("/HOLDER: Water");
			((Renderer)((Component)val6.transform.GetChild(1)).GetComponent<MeshRenderer>()).material = matAncientLoft_Water;
			GameObject val7 = GameObject.Find("/HOLDER: Terrain/Endless Hole Illusion Card");
			((Renderer)val7.GetComponent<MeshRenderer>()).material = matAncientLoftEndlessHole;
			((Renderer)((Component)val7.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = matAncientLoftEndlessHole;
			((Renderer)((Component)val7.transform.GetChild(1)).GetComponent<MeshRenderer>()).material = matAncientLoftEndlessHole;
			((Renderer)((Component)val7.transform.GetChild(2)).GetComponent<MeshRenderer>()).material = matAncientLoftEndlessHole;
			GameObject val8 = GameObject.Find("/HOLDER: Cards");
			Transform child = val8.transform.GetChild(3);
			Vector3 localScale = child.localScale;
			localScale.z *= -1f;
			child.localScale = localScale;
			((Component)val8.transform.GetChild(4)).gameObject.SetActive(false);
			((Component)val8.transform.GetChild(5)).gameObject.SetActive(false);
			MeshRenderer[] componentsInChildren = val8.GetComponentsInChildren<MeshRenderer>();
			MeshRenderer[] array = componentsInChildren;
			foreach (MeshRenderer val9 in array)
			{
				switch (((Object)((Renderer)val9).material).name)
				{
				case "matAncientLoft_SunCloud (Instance)":
					((Renderer)val9).material = matAncientLoft_SunCloud;
					break;
				case "matAncientLoft_CloudFloor (Instance)":
					((Renderer)val9).material = matAncientLoft_CloudFloor;
					break;
				case "matAncientLoftDeepFog (Instance)":
					((Renderer)val9).material = matAncientLoftDeepFog;
					break;
				}
			}
			((Renderer)((Component)val2.transform.GetChild(3)).GetComponent<ParticleSystemRenderer>()).material = matAncientLoft_Cloud;
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			//IL_001f: 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_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: 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_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//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_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Expected O, but got Unknown
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
				DirectorCard val = new DirectorCard
				{
					spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscLunarExploder"),
					selectionWeight = 1,
					preventOverhead = false,
					minimumStageCompletions = 0,
					spawnDistance = (MonsterSpawnDistance)0
				};
				DirectorCard val2 = new DirectorCard
				{
					spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscLunarGolem"),
					selectionWeight = 1,
					preventOverhead = false,
					minimumStageCompletions = 4,
					spawnDistance = (MonsterSpawnDistance)0
				};
				DirectorCard val3 = new DirectorCard
				{
					spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscLunarWisp"),
					selectionWeight = 1,
					preventOverhead = true,
					minimumStageCompletions = 4,
					spawnDistance = (MonsterSpawnDistance)0
				};
				dccs.AddCard(2, val);
				dccs.AddCard(0, val2);
				dccs.AddCard(0, val3);
			}
		}
	}
	public class Variants_2_FoggySwamp
	{
		public static void Setup()
		{
		}

		private static void AltarSkeletonDeath_Explode(orig_Explode orig, AltarSkeletonDeath self)
		{
			orig.Invoke(self);
		}

		public static void LoopWeather()
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d5: 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_0325: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Expected O, but got Unknown
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: 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_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_050b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Unknown result type (might be due to invalid IL or missing references)
			//IL_053d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0544: Expected O, but got Unknown
			//IL_055f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0564: Unknown result type (might be due to invalid IL or missing references)
			//IL_0584: Unknown result type (might be due to invalid IL or missing references)
			//IL_0589: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_05fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0601: Expected O, but got Unknown
			//IL_061c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0621: Unknown result type (might be due to invalid IL or missing references)
			//IL_062b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0630: Unknown result type (might be due to invalid IL or missing references)
			//IL_066a: Unknown result type (might be due to invalid IL or missing references)
			//IL_068b: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.Find("/Directional Light (SUN)");
			val.GetComponent<Light>().shadowStrength = 0.5f;
			GameObject val2 = GameObject.Find("/HOLDER: Hero Assets");
			Transform child = val2.transform.GetChild(0);
			Transform child2 = val2.transform.GetChild(1);
			Material val3 = Object.Instantiate<Material>(((Renderer)((Component)child).GetComponent<MeshRenderer>()).material);
			Material val4 = Object.Instantiate<Material>(val3);
			val4.color = new Color(1f, 1f, 1f, 0.8f);
			val3.color = new Color(1f, 1f, 1f, 0.8f);
			((Renderer)((Component)child).GetComponent<MeshRenderer>()).material = val3;
			((Renderer)((Component)child2).GetComponent<MeshRenderer>()).material = val4;
			GameObject val5 = Object.Instantiate<GameObject>(((Component)child).gameObject);
			Object.Destroy((Object)(object)val5.GetComponent<MeshRenderer>());
			Transform transform = GameObject.Find("/HOLDER: Foliage/Cloverfield").transform;
			Tools.UpTransformByY(child, 1f);
			Tools.UpTransformByY(transform.GetChild(8), 1f);
			Tools.UpTransformByY(transform.GetChild(9), 1f);
			Tools.UpTransformByY(transform.GetChild(15), 1f);
			Tools.UpTransformByY(transform.GetChild(16), 1f);
			Tools.UpTransformByY(transform.GetChild(17), 1f);
			Tools.UpTransformByY(transform.GetChild(10), 1f);
			Tools.UpTransformByY(transform.GetChild(32), 1f);
			Tools.UpTransformByY(transform.GetChild(33), 1f);
			Tools.UpTransformByY(transform.GetChild(47), 1f);
			Tools.UpTransformByY(transform.GetChild(48), 1f);
			Tools.UpTransformByY(transform.GetChild(45), 1f);
			float num = -149.5f;
			Tools.UpTransformByY(child2, 5.1f);
			Tools.UpTransformByY(transform.GetChild(63), 5.1f);
			Tools.UpTransformByY(transform.GetChild(64), 5.1f);
			GameObject val6 = GameObject.Find("/HOLDER: Ruin Pieces");
			Transform val7 = val6.transform.Find("FSGiantRuinDoorCollision (3)");
			Transform val8 = val6.transform.Find("FSGiantRuinDoorCollision (1)");
			val7.localScale = new Vector3(1f, 2f, 1f);
			val8.localScale = new Vector3(1f, 2f, 1f);
			Tools.UpTransformByY(val7, -40.5f);
			Tools.UpTransformByY(val8, -40.5f);
			GameObject val9 = GameObject.Find("/HOLDER: Tree Trunks w Collision/");
			Transform child3 = val9.transform.GetChild(20);
			child3.localEulerAngles = new Vector3(0f, 340f, 90f);
			child3.localPosition = new Vector3(85f, -150.9878f, -156.2819f);
			Transform val10 = val9.transform.Find("FSTreeTrunkMediumCollision (28)");
			val10.rotation = new Quaternion(-0.5998f, -0.5506f, 0.3745f, 0.4437f);
			val10.localPosition = new Vector3(-87.9046f, -153.3757f, -209.8361f);
			val10.localScale = new Vector3(1.54f, 1.62f, 1.54f);
			GameObject val11 = new GameObject("New Waters");
			val11.transform.localPosition = new Vector3(0f, num, 0f);
			GameObject val12 = Object.Instantiate<GameObject>(((Component)child).gameObject, val11.transform);
			((Renderer)val12.GetComponent<MeshRenderer>()).material = val4;
			val12.transform.rotation = new Quaternion(-0.6996f, 0.1027f, -0.1027f, -0.6996f);
			val12.transform.localPosition = new Vector3(-222.6811f, 0f, -379.4f);
			GameObject val13 = Object.Instantiate<GameObject>(val12.gameObject, val11.transform);
			val13.transform.rotation = new Quaternion(-0.6996f, 0.1027f, -0.1027f, -0.6996f);
			val13.transform.localPosition = new Vector3(-64.5721f, 0f, -150.2274f);
			val13.transform.localScale = new Vector3(354.2f, 100f, 100f);
			GameObject val14 = Object.Instantiate<GameObject>(val12.gameObject, val11.transform);
			val14.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
			val14.transform.localPosition = new Vector3(-64.5721f, 0f, -114.2274f);
			val14.transform.localScale = new Vector3(200f, 100f, 100f);
			GameObject val15 = GameObject.Find("/HOLDER: Hidden Altar Stuff");
			HookLightingIntoPostProcessVolume component = ((Component)val15.transform.GetChild(2)).GetComponent<HookLightingIntoPostProcessVolume>();
			component.defaultAmbientColor = new Color(0.2363f, 0.3038f, 0.42f, 1f) * 1.4f;
			PostProcessVolume component2 = ((Component)SceneInfo.instance).GetComponent<PostProcessVolume>();
			RampFog val16 = (RampFog)component2.profile.settings[0];
			((ParameterOverride<Color>)(object)val16.fogColorEnd).value = new Color(0.3535f, 0.4074f, 0.4434f, 0.94f);
			((ParameterOverride<Color>)(object)val16.fogColorMid).value = new Color(0.3373f, 0.3793f, 0.4157f, 0.65f);
			((ParameterOverride<Color>)(object)val16.fogColorStart).value = new Color(0f, 0f, 0f, 0f);
			((ParameterOverride<float>)(object)val16.fogOne).value = 0.09f;
			((ParameterOverride<float>)(object)val16.fogPower).value = 2f;
			component2.profile.settings[0] = (PostProcessEffectSettings)(object)val16;
			Bloom val17 = (Bloom)Variants_4_DampCaveSimpleAbyss.ppSceneDampcaveHot.settings[1];
			((ParameterOverride<Color>)(object)val17.color).value = new Color(1.2f, 1.2f, 1f, 1f);
			GameObject val18 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/ShrineHalcyonite.prefab").WaitForCompletion();
			GameObject val19 = Object.Instantiate<GameObject>(((Component)val18.transform.GetChild(7)).gameObject);
			val19.transform.position = new Vector3(50f, -150f, -150f);
			val19.transform.localScale = new Vector3(6f, 6f, 6f);
			GameObject val20 = Object.Instantiate<GameObject>(((Component)val18.transform.GetChild(8)).gameObject);
			val20.SetActive(true);
			val20.AddComponent<WeatherParticles>().lockPosition = true;
			val18.transform.GetChild(9);
		}

		public static void AddVariantMonsters(DirectorCardCategorySelection dccs)
		{
			if (!((Object)(object)dccs == (Object)null) && LoopVariantsMain.AddMonsters)
			{
			}
		}
	}
	public class Variants_2_Goolake
	{
		public class DebuffZoneFixed : MonoBehaviour
		{
			public float buffTimer;

			public float interval;

			[Tooltip("The buff type to grant")]
			public BuffDef buffType;

			[Tooltip("The buff duration")]
			public float buffDuration;

			public string buffApplicationSoundString;

			public GameObject buffApplicationEffectPrefab;

			private void Awake()
			{
			}

			private void OnTriggerEnter(Collider other)
			{
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_009b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Expected O, but got Unknown
				if (!NetworkServer.active)
				{
					return;
				}
				if (!WConfig.cfgGameplayChanges.Value)
				{
					buffType = null;
				}
				if (!Object.op_Implicit((Object)(object)buffType))
				{
					return;
				}
				CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.AddTimedBuff(buffType.buffIndex, buffDuration);
					Util.PlaySound(buffApplicationSoundString, ((Component)component).gameObject);
					if (Object.op_Implicit((Object)(object)buffApplicationEffectPrefab))
					{
						EffectManager.SpawnEffect(buffApplicationEffectPrefab, new EffectData
						{
							origin = ((Component)component.mainHurtBox).transform.position,
							scale = component.radius
						}, true);
					}
				}
			}

			private void OnTriggerStay(Collider other)
			{
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				if (!NetworkServer.active || !Object.op_Implicit((Object)(object)buffType))
				{
					return;
				}
				buffTimer -= Time.fixedDeltaTime;
				if (buffTimer <= 0f)
				{
					buffTimer = interval;
					CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
					if (Object.op_Implicit((Object)(object)component))
					{
						component.AddTimedBuff(buffType.buffIndex, buffDuration);
					}
				}
			}
		}

		public static Material matGoolakeTerrain;

		public static Cubemap ReflectionProbe = Addressables.LoadAssetAsync<Cubemap>((object)"RoR2/Base/goolake/ReflectionProbe-0.exr").WaitForCompletion();

		public static void Setup()
		{
			//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)
			matGoolakeTerrain = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/goolake/matGoolakeTerrain.mat").WaitForCompletion());
			matGoolakeTerrain.SetFloat("_BlueChannelBias", 0.4f);
		}

		public static void LoopWeather()
		{
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: 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_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Expected O, but got Unknown
			//IL_0667: Unknown result type (might be due to invalid IL or missing references)
			//IL_066c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0692: Unknown result type (might be due to invalid IL or missing references)
			//IL_0699: Expected O, but got Unknown
			//IL_06b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d9: Unknown result type (might be due to invalid IL