Decompiled source of HedgehogUtils v2.0.1

HedgehogUtils.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.ScavMonster;
using EntityStates.SolusHeart;
using EntityStates.SolusHeart.Death;
using EntityStates.SolusHeart.Phase1;
using EntityStates.SolusHeart.Phase2;
using EntityStates.SolusHeart.PhasePreFightCutscene;
using HG;
using HG.BlendableTypes;
using HG.Reflection;
using HedgehogUtils.Boost;
using HedgehogUtils.Boost.EntityStates;
using HedgehogUtils.Forms;
using HedgehogUtils.Forms.EntityStates;
using HedgehogUtils.Forms.SuperForm;
using HedgehogUtils.Forms.SuperForm.EntityStates;
using HedgehogUtils.Internal;
using HedgehogUtils.Launch;
using HedgehogUtils.Miscellaneous;
using HedgehogUtils.Voicelines;
using JetBrains.Annotations;
using LookingGlass.ItemStatsNameSpace;
using LookingGlass.LookingGlassLanguage;
using Microsoft.CodeAnalysis;
using On.EntityStates.SolusHeart;
using On.EntityStates.SolusHeart.Death;
using On.EntityStates.SolusHeart.Phase1;
using On.EntityStates.SolusHeart.Phase2;
using On.RoR2;
using On.RoR2.SolusWing;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using Rebindables;
using Rewired;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.Hologram;
using RoR2.HudOverlay;
using RoR2.Navigation;
using RoR2.Skills;
using RoR2.SolusWing;
using RoR2.SurvivorMannequins;
using RoR2.UI;
using RoR2.UI.MainMenu;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.Serialization;
using UnityEngine.UI;

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

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace HedgehogUtils
{
	public static class Assets
	{
		private const string assetbundleName = "hedgehogutilsbundle";

		private const string dllName = "HedgehogUtils.dll";

		internal static AssetBundle mainAssetBundle;

		internal static GameObject powerBoostFlashEffect;

		internal static GameObject powerBoostAuraEffect;

		public static GameObject boostFlashEffectBase;

		public static GameObject boostAuraEffectBase;

		internal static Material boostMaterialBase;

		public static GameObject boostHUD;

		public static GameObject launchAuraEffect;

		public static GameObject launchCritAuraEffect;

		public static GameObject launchHitEffect;

		public static GameObject launchCritHitEffect;

		public static GameObject launchWallCollisionEffect;

		public static GameObject launchWallCollisionLargeEffect;

		public static Material superAuraMaterialBase;

		public static Material superAuraMaterial;

		public static Material superFormGlowingMaterial;

		public static Material superFormOverlay;

		public static Material rainbowGlowMaterial;

		public static Material rainbowGlowSubtleMaterial;

		public static Material darkSparkle;

		public static GameObject superFormTransformationEffect;

		public static GameObject transformationEmeraldSwirl;

		public static GameObject superFormAura;

		public static GameObject superFormWarning;

		public static LoopSoundDef superLoopSoundDef;

		public static GameObject superFormPPVolume;

		public static GameObject chaosEmeraldDropletPrefab;

		public static Material ringMaterial;

		public static GameObject chaosSnapInEffect;

		public static GameObject chaosSnapOutEffect;

		public static Material chaosSnapMaterial;

		public static GameObject lockOnIndicator;

		public static Material lockOnUIRemap;

		public static Material glitchOverlayMaterial;

		public static void Initialize()
		{
			LoadAssetBundle();
			LoadSoundbank();
			Miscellaneous();
			BoostAndLaunch();
			SuperForm();
		}

		internal static void LoadAssetBundle()
		{
			try
			{
				if ((Object)(object)mainAssetBundle == (Object)null)
				{
					mainAssetBundle = AssetBundle.LoadFromFile(Assembly.GetExecutingAssembly().Location.Replace("HedgehogUtils.dll", "hedgehogutilsbundle"));
				}
			}
			catch (Exception ex)
			{
				Log.Error("Failed to load assetbundle. Make sure your assetbundle name is setup correctly\n" + ex);
			}
		}

		internal static void LoadSoundbank()
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HedgehogUtils.HedgehogUtilsBank.bnk");
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			SoundBanks.Add(array);
		}

		public static void BoostAndLaunch()
		{
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: 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)
			boostAuraEffectBase = CreateBoostAuraPrefabBase();
			boostFlashEffectBase = CreateBoostFlashPrefabBase();
			powerBoostFlashEffect = MaterialSwap(LoadEffect("SonicPowerBoostFlash", parentToTransform: true), RoR2_Base_Common_VFX.matDistortionFaded_mat, "Distortion");
			powerBoostAuraEffect = LoadAsyncedEffect("SonicPowerBoostAura");
			boostHUD = mainAssetBundle.LoadAsset<GameObject>("BoostMeter");
			boostHUD.AddComponent<BoostHUD>();
			Color val = default(Color);
			((Color)(ref val))..ctor(0.4f, 0.4f, 0.4f);
			launchAuraEffect = CreateBoostAuraEffect("LaunchProjectileAura", null, val, Color.black, val, 1f);
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0.9f, 0.15f, 0.15f);
			launchCritAuraEffect = CreateBoostAuraEffect("LaunchCritProjectileAura", null, val2, Color.black, val2, 1f);
			AsyncOperationHandle<GameObject> val3 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_ArmorReductionOnHit.PulverizedEffect_prefab);
			val3.Completed += delegate(AsyncOperationHandle<GameObject> x)
			{
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				launchHitEffect = CreateLaunchHitEffect(x.Result, "HedgehogUtilsLaunchHitEffect", new Color(1f, 0.8f, 0.4f), new Color(0.8f, 0.8f, 0.8f));
				launchCritHitEffect = CreateLaunchHitEffect(x.Result, "HedgehogUtilsLaunchCritHitEffect", new Color(1f, 0.1f, 0.2f), new Color(0.9f, 0.7f, 0.7f));
			};
			AsyncOperationHandle<GameObject> val4 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_SurvivorPod.PodGroundImpact_prefab);
			val4.Completed += delegate(AsyncOperationHandle<GameObject> x)
			{
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_021b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0245: Unknown result type (might be due to invalid IL or missing references)
				//IL_024a: Unknown result type (might be due to invalid IL or missing references)
				//IL_024e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0253: Unknown result type (might be due to invalid IL or missing references)
				//IL_0271: Unknown result type (might be due to invalid IL or missing references)
				//IL_027b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0280: Unknown result type (might be due to invalid IL or missing references)
				//IL_029e: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
				//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
				//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
				launchWallCollisionLargeEffect = PrefabAPI.InstantiateClone(x.Result, "HedgehogUtilsLaunchWallCollisionLarge");
				launchWallCollisionLargeEffect.AddComponent<NetworkIdentity>();
				launchWallCollisionLargeEffect.GetComponent<ShakeEmitter>().wave.amplitude = 0.4f;
				Object.Destroy((Object)(object)launchWallCollisionLargeEffect.GetComponent<AlignToNormal>());
				Object.Destroy((Object)(object)((Component)launchWallCollisionLargeEffect.transform.Find("Particles/Flash")).gameObject);
				Object.Destroy((Object)(object)((Component)launchWallCollisionLargeEffect.transform.Find("Particles/Sparks")).gameObject);
				Object.Destroy((Object)(object)((Component)launchWallCollisionLargeEffect.transform.Find("Particles/Point Light")).gameObject);
				ShapeModule shape = ((Component)launchWallCollisionLargeEffect.transform.Find("Particles/Dust, Directional")).GetComponent<ParticleSystem>().shape;
				((ShapeModule)(ref shape)).radius = 6f;
				launchWallCollisionLargeEffect.GetComponent<EffectComponent>().soundName = "";
				launchWallCollisionEffect = PrefabAPI.InstantiateClone(x.Result, "HedgehogUtilsLaunchWallCollision");
				launchWallCollisionEffect.AddComponent<NetworkIdentity>();
				Object.Destroy((Object)(object)launchWallCollisionEffect.GetComponent<AlignToNormal>());
				Object.Destroy((Object)(object)((Component)launchWallCollisionEffect.transform.Find("Particles/Flash")).gameObject);
				Object.Destroy((Object)(object)((Component)launchWallCollisionEffect.transform.Find("Particles/Sparks")).gameObject);
				Object.Destroy((Object)(object)((Component)launchWallCollisionEffect.transform.Find("Particles/Point Light")).gameObject);
				Object.Destroy((Object)(object)((Component)launchWallCollisionEffect.transform.Find("Particles/Debris, 3D")).gameObject);
				Object.Destroy((Object)(object)launchWallCollisionEffect.GetComponent<ShakeEmitter>());
				GameObject gameObject = ((Component)launchWallCollisionEffect.transform.Find("Particles/Dust, Directional")).gameObject;
				MainModule main = gameObject.GetComponent<ParticleSystem>().main;
				MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime;
				((MinMaxCurve)(ref startLifetime)).constantMax = 0.3f;
				((MinMaxCurve)(ref startLifetime)).constantMax = 0.6f;
				((MainModule)(ref main)).startLifetime = startLifetime;
				MinMaxCurve startSize = ((MainModule)(ref main)).startSize;
				((MinMaxCurve)(ref startSize)).constantMin = 0.4f;
				((MinMaxCurve)(ref startSize)).constantMax = 1.3f;
				((MainModule)(ref main)).startSize = startSize;
				GameObject gameObject2 = ((Component)launchWallCollisionEffect.transform.Find("Particles/Dust")).gameObject;
				MainModule main2 = gameObject2.GetComponent<ParticleSystem>().main;
				MinMaxCurve startLifetime2 = ((MainModule)(ref main2)).startLifetime;
				((MinMaxCurve)(ref startLifetime2)).constantMin = 0.6f;
				((MinMaxCurve)(ref startLifetime2)).constantMax = 1.4f;
				((MainModule)(ref main2)).startLifetime = startLifetime2;
				MinMaxCurve startSize2 = ((MainModule)(ref main2)).startSize;
				((MinMaxCurve)(ref startSize2)).constantMin = 1.5f;
				((MinMaxCurve)(ref startSize2)).constantMax = 3f;
				((MainModule)(ref main2)).startSize = startSize2;
				ParticleSystem component = ((Component)launchWallCollisionEffect.transform.Find("Particles/Debris")).gameObject.GetComponent<ParticleSystem>();
				EmissionModule emission = component.emission;
				Burst burst = ((EmissionModule)(ref emission)).GetBurst(0);
				((Burst)(ref burst)).count = MinMaxCurve.op_Implicit(10f);
				EmissionModule emission2 = component.emission;
				((EmissionModule)(ref emission2)).SetBurst(0, burst);
				launchWallCollisionEffect.GetComponent<EffectComponent>().soundName = "";
				AddNewEffectDef(launchWallCollisionEffect, "Play_hedgehogutils_launch_collide");
				AddNewEffectDef(launchWallCollisionLargeEffect, "Play_hedgehogutils_launch_collide_large");
			};
		}

		private static GameObject CreateBoostAuraPrefabBase()
		{
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: 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_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: 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)
			GameObject val = LoadEffect("BoostAuraPrefab", "", parentToTransform: true, 0.45f, addNewEffectDef: false);
			FadeTrailAndLightWithDestroy fadeTrailAndLightWithDestroy = val.AddComponent<FadeTrailAndLightWithDestroy>();
			fadeTrailAndLightWithDestroy.trail = ((Component)val.transform.GetChild(2)).GetComponent<TrailRenderer>();
			fadeTrailAndLightWithDestroy.lightIntensityCurve = ((Component)val.transform.GetChild(1)).gameObject.AddComponent<LightIntensityCurve>();
			fadeTrailAndLightWithDestroy.lightIntensityCurve.light = ((Component)fadeTrailAndLightWithDestroy.lightIntensityCurve).GetComponent<Light>();
			fadeTrailAndLightWithDestroy.lightIntensityCurve.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
			fadeTrailAndLightWithDestroy.lightIntensityCurve.timeMax = 0.25f;
			fadeTrailAndLightWithDestroy.stopParticles = true;
			VFXAttributes val2 = val.AddComponent<VFXAttributes>();
			val2.vfxPriority = (VFXPriority)2;
			val2.optionalLights = (Light[])(object)new Light[1] { ((Component)val.transform.GetChild(1)).GetComponent<Light>() };
			ParticleSystemRenderer component = ((Component)val.transform.GetChild(0).GetChild(0)).GetComponent<ParticleSystemRenderer>();
			ParticleSystemRenderer component2 = ((Component)val.transform.GetChild(0).GetChild(1)).GetComponent<ParticleSystemRenderer>();
			ParticleSystemRenderer component3 = ((Component)val.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<ParticleSystemRenderer>();
			Mesh mesh = (component2.mesh = (component.mesh = AssetAsyncReferenceManager<Mesh>.LoadAsset(new AssetReferenceT<Mesh>(RoR2_DLC2_Common.mdlVFXDome_fbx_mdVFXDome_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()));
			component3.mesh = mesh;
			boostMaterialBase = AssetAsyncReferenceManager<Material>.LoadAsset(new AssetReferenceT<Material>(RoR2_Base_Common_VFX.matDustExhaust_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion();
			boostMaterialBase.SetFloat("_AlphaBoost", 2f);
			boostMaterialBase.SetInt("_SrcBlend", 1);
			boostMaterialBase.SetInt("_DstBlend", 1);
			boostMaterialBase.SetColor("_TintColor", new Color(0.1f, 0.1f, 0.1f));
			((Renderer)component).sharedMaterial = boostMaterialBase;
			((Renderer)component2).sharedMaterial = boostMaterialBase;
			((Renderer)component3).sharedMaterial = boostMaterialBase;
			return val;
		}

		private static GameObject CreateBoostFlashPrefabBase()
		{
			//IL_0068: 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_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = LoadEffect("BoostFlashPrefab", "", parentToTransform: true, 0.55f, addNewEffectDef: false);
			VFXAttributes component = val.GetComponent<VFXAttributes>();
			component.DoNotPool = false;
			component.optionalLights = (Light[])(object)new Light[1] { ((Component)val.transform.GetChild(1)).GetComponent<Light>() };
			((Component)val.transform.GetChild(0).GetChild(0)).GetComponent<ParticleSystemRenderer>().mesh = AssetAsyncReferenceManager<Mesh>.LoadAsset(new AssetReferenceT<Mesh>(RoR2_DLC2_Common.mdlVFXDome_fbx_mdVFXDome_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion();
			((Renderer)((Component)val.transform.GetChild(0).GetChild(1)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = AssetAsyncReferenceManager<Material>.LoadAsset(new AssetReferenceT<Material>(RoR2_Base_Common_VFX.matDistortionFaded_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion();
			LightIntensityCurve val2 = ((Component)val.transform.GetChild(1)).gameObject.AddComponent<LightIntensityCurve>();
			val2.light = ((Component)val2).gameObject.AddComponent<Light>();
			val2.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
			val2.timeMax = 0.5f;
			return val;
		}

		public static GameObject CreateBoostAuraEffect(string name, Color color)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			return CreateBoostAuraEffect(name, Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampTritone_png).WaitForCompletion(), color, color, color, 1f);
		}

		public static GameObject CreateBoostAuraEffect(string name, Texture remapTex, Color color)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return CreateBoostAuraEffect(name, remapTex, Color.white, color, color, 1f);
		}

		public static GameObject CreateBoostAuraEffect(string name, Color tintColor, Color lightColor, Color trailColor, float size)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			return CreateBoostAuraEffect(name, Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampTritone_png).WaitForCompletion(), tintColor, lightColor, trailColor, size);
		}

		public static GameObject CreateBoostAuraEffect(string name, Texture remapTex, Color tintColor, Color lightColor, Color trailColor, float size)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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)
			return CreateBoostAuraEffect(name, CreateBoostAuraOuterMaterial(name, tintColor, remapTex), CreateBoostAuraInnerMaterial(name, tintColor, remapTex), lightColor, trailColor, size);
		}

		public static Material CreateBoostAuraOuterMaterial(string name, Color tintColor, Texture remapTex, bool allowDarkColors = false)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			Material val = new Material(boostMaterialBase);
			((Object)val).name = "mat" + name + "Constant";
			val.SetColor("_TintColor", tintColor);
			if (Object.op_Implicit((Object)(object)remapTex))
			{
				val.SetTexture("_RemapTex", remapTex);
			}
			val.SetFloat("_Boost", 1.5f);
			val.SetFloat("_AlphaBoost", 5f);
			val.SetInt("_Cull", 2);
			val.SetTexture("_MainTex", mainAssetBundle.LoadAsset<Texture>("texBoostEffect"));
			val.SetTextureScale("_MainTex", new Vector2(2.5f, 1f));
			val.SetTextureOffset("_MainTex", new Vector2(0f, 0.15f));
			val.SetVector("_CutoffScroll", new Vector4(2f, 10f, -4f, 4f));
			val.SetFloat("_DepthOffset", -0.15f);
			if (allowDarkColors)
			{
				val.SetInt("_SrcBlend", 5);
				val.SetInt("_DstBlend", 10);
			}
			return val;
		}

		public static Material CreateBoostAuraInnerMaterial(string name, Color tintColor, Texture remapTex, bool allowDarkColors = false)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			Material val = new Material(boostMaterialBase);
			((Object)val).name = "mat" + name + "ConstantInner";
			val.SetColor("_TintColor", tintColor);
			if (Object.op_Implicit((Object)(object)remapTex))
			{
				val.SetTexture("_RemapTex", remapTex);
			}
			val.SetFloat("_Boost", 1f);
			val.SetFloat("_AlphaBoost", 6f);
			val.SetInt("_Cull", 1);
			val.SetTexture("_MainTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC3.texCylinderGradient_Horz_png).WaitForCompletion());
			val.SetTextureScale("_MainTex", new Vector2(1f, 0.45f));
			val.SetTextureOffset("_MainTex", new Vector2(0f, 0.15f));
			val.SetTexture("_Cloud1Tex", mainAssetBundle.LoadAsset<Texture>("texCloudTriangles"));
			val.SetTextureScale("_Cloud1Tex", new Vector2(3f, 0.3f));
			val.SetVector("_CutoffScroll", new Vector4(20f, 20f, -30f, 10f));
			if (allowDarkColors)
			{
				val.SetInt("_SrcBlend", 5);
				val.SetInt("_DstBlend", 10);
			}
			return val;
		}

		public static GameObject CreateBoostAuraEffect(string name, Material outerMat, Material innerMat, Color lightColor, Color trailColor, float size)
		{
			//IL_0073: 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_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			GameObject boostAura = PrefabAPI.InstantiateClone(boostAuraEffectBase, name);
			((Renderer)((Component)boostAura.transform.GetChild(0).GetChild(1)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = outerMat;
			((Renderer)((Component)boostAura.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = innerMat;
			Light component = ((Component)boostAura.transform.GetChild(1)).GetComponent<Light>();
			TrailRenderer component2 = ((Component)boostAura.transform.GetChild(2)).GetComponent<TrailRenderer>();
			if (lightColor != Color.black)
			{
				component.color = lightColor;
			}
			else
			{
				Object.Destroy((Object)(object)((Component)component).gameObject);
			}
			if (trailColor != Color.black)
			{
				Gradient colorGradientCopy = component2.GetColorGradientCopy();
				colorGradientCopy.colorKeys = (GradientColorKey[])(object)new GradientColorKey[1]
				{
					new GradientColorKey(trailColor, 0f)
				};
				component2.SetColorGradient(colorGradientCopy);
			}
			else
			{
				Object.Destroy((Object)(object)((Component)component2).gameObject);
			}
			ResizeBoostAura(ref boostAura, size);
			return boostAura;
		}

		public static GameObject CreateBoostFlashEffect(string name, Color color)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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)
			return CreateBoostFlashEffect(name, Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampTritone_png).WaitForCompletion(), color, color, distortion: true, 1f);
		}

		public static GameObject CreateBoostFlashEffect(string name, Texture remapTex, Color color)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			return CreateBoostFlashEffect(name, remapTex, Color.white, color, distortion: true, 1f);
		}

		public static GameObject CreateBoostFlashEffect(string name, Color tintColor, Color lightColor, bool distortion, float size)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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)
			return CreateBoostFlashEffect(name, Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampTritone_png).WaitForCompletion(), tintColor, lightColor, distortion, size);
		}

		public static GameObject CreateBoostFlashEffect(string name, Texture remapTex, Color tintColor, Color lightColor, bool distortion, float size)
		{
			//IL_0004: 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)
			return CreateBoostFlashEffect(name, CreateBoostFlashMaterial(name, remapTex, tintColor), lightColor, distortion, size);
		}

		public static Material CreateBoostFlashMaterial(string name, Texture remapTex, Color tintColor, bool allowDarkColors = false)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0024: 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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			Material val = new Material(boostMaterialBase);
			((Object)val).name = "mat" + name;
			val.SetColor("_TintColor", tintColor);
			if (Object.op_Implicit((Object)(object)remapTex))
			{
				val.SetTexture("_RemapTex", remapTex);
			}
			val.SetFloat("_Boost", 1.5f);
			val.SetFloat("_AlphaBoost", 5f);
			val.SetTexture("_MainTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC2_Common.texRampVerticalSmoothFalloff_png).WaitForCompletion());
			val.DisableKeyword("CLOUDOFFSET");
			val.SetTexture("_Cloud1Tex", mainAssetBundle.LoadAsset<Texture>("texBoostEffect"));
			val.SetTextureScale("_Cloud1Tex", new Vector2(2.5f, 1f));
			val.SetVector("_CutoffScroll", new Vector4(-20f, 45f, 20f, 15f));
			if (allowDarkColors)
			{
				val.SetInt("_SrcBlend", 5);
				val.SetInt("_DstBlend", 10);
			}
			return val;
		}

		public static GameObject CreateBoostFlashEffect(string name, Material material, Color lightColor, bool distortion, float size)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			GameObject boostFlash = PrefabAPI.InstantiateClone(boostFlashEffectBase, name);
			ResizeBoostFlash(ref boostFlash, size);
			((Renderer)((Component)boostFlash.transform.GetChild(0).GetChild(0)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = material;
			((Component)boostFlash.transform.GetChild(1)).GetComponent<Light>().color = lightColor;
			if (!distortion)
			{
				Object.Destroy((Object)(object)((Component)boostFlash.transform.GetChild(0).GetChild(1)).gameObject);
			}
			AddNewEffectDef(boostFlash);
			return boostFlash;
		}

		public static void ResizeBoostAura(ref GameObject boostAura, float size)
		{
			//IL_0025: 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)
			Transform child = boostAura.transform.GetChild(0);
			child.localScale = new Vector3(size * 0.6f, size * 0.6f, size * 0.6f);
			child.localPosition = new Vector3(0f, 0.1f, -0.7f + 0.6f * (1f - size));
		}

		public static void ResizeBoostFlash(ref GameObject boostFlash, float size)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			Transform child = boostFlash.transform.GetChild(0);
			child.localScale = new Vector3(size, size, size);
			child.localPosition = new Vector3(0f, 0.1f, -1.6f + (1f - size));
		}

		private static GameObject CreateLaunchHitEffect(GameObject baseHitEffect, string name, Color ringColor, Color beamColor)
		{
			//IL_0036: 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_003e: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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)
			GameObject val = PrefabAPI.InstantiateClone(baseHitEffect, name);
			val.AddComponent<NetworkIdentity>();
			Object.Destroy((Object)(object)val.GetComponent<ParticleSystem>());
			MainModule main = ((Component)val.transform.Find("Ring")).gameObject.GetComponent<ParticleSystem>().main;
			((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(ringColor);
			MainModule main2 = ((Component)val.transform.Find("Beams")).gameObject.GetComponent<ParticleSystem>().main;
			((MainModule)(ref main2)).startColor = MinMaxGradient.op_Implicit(beamColor);
			Object.Destroy((Object)(object)((Component)val.transform.Find("Mesh")).gameObject);
			Object.Destroy((Object)(object)((Component)val.transform.Find("Point Light")).gameObject);
			val.GetComponent<EffectComponent>().soundName = "Play_beetle_guard_impact";
			AddNewEffectDef(val, "");
			return val;
		}

		public static void SuperForm()
		{
			//IL_002d: 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_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: 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_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_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: 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_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Expected O, but got Unknown
			//IL_0459: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_051e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: 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_05df: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0304: 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_036b: 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_0612: Unknown result type (might be due to invalid IL or missing references)
			//IL_0617: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0694: Unknown result type (might be due to invalid IL or missing references)
			//IL_0706: Unknown result type (might be due to invalid IL or missing references)
			//IL_072a: Unknown result type (might be due to invalid IL or missing references)
			//IL_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_077a: Unknown result type (might be due to invalid IL or missing references)
			//IL_077f: Unknown result type (might be due to invalid IL or missing references)
			//IL_079a: Unknown result type (might be due to invalid IL or missing references)
			//IL_079f: Unknown result type (might be due to invalid IL or missing references)
			superFormTransformationEffect = LoadEffect("SuperTransformationEffect", "", parentToTransform: false, 1.5f);
			superFormTransformationEffect.GetComponent<VFXAttributes>().vfxIntensity = (VFXIntensity)1;
			superFormTransformationEffect.GetComponent<EffectComponent>().applyScale = true;
			darkSparkle = new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_DLC3_Parry.matParryFlash_mat).WaitForCompletion());
			darkSparkle.SetFloat("_DstBlend", 10f);
			darkSparkle.EnableKeyword("VERTEXCOLOR");
			darkSparkle.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampTritone_png).WaitForCompletion());
			darkSparkle.SetFloat("_AlphaBoost", 1.5f);
			darkSparkle.SetFloat("_DepthOffset", -10f);
			darkSparkle.SetInt("_ZTest", 8);
			((Renderer)((Component)superFormTransformationEffect.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = darkSparkle;
			((Renderer)((Component)superFormTransformationEffect.transform.GetChild(1)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Huntress.matHuntressFlash_mat).WaitForCompletion();
			ParticleSystemRenderer component = ((Component)superFormTransformationEffect.transform.GetChild(2)).GetComponent<ParticleSystemRenderer>();
			((Renderer)component).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_Seeker_SojournVehicle.matSojournTrail_mat).WaitForCompletion();
			component.mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_Common_VFX.mdlVFXDonut2_fbx_donut2Mesh_).WaitForCompletion();
			((Renderer)((Component)superFormTransformationEffect.transform.GetChild(4)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_TeamWarCry.matTeamWarCryDistortion_mat).WaitForCompletion();
			((Renderer)((Component)superFormTransformationEffect.transform.GetChild(6)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Common_VFX.matWideGlow_mat).WaitForCompletion();
			LightIntensityCurve val = ((Component)superFormTransformationEffect.transform.GetChild(7)).gameObject.AddComponent<LightIntensityCurve>();
			val.timeMax = 1f;
			val.curve = AnimationCurve.EaseInOut(0f, 0.8f, 1f, 0f);
			PostProcessVolume component2 = ((Component)superFormTransformationEffect.transform.GetChild(12)).GetComponent<PostProcessVolume>();
			component2.sharedProfile = Addressables.LoadAssetAsync<PostProcessProfile>((object)RoR2_GlobalContent.ppLocalBrotherImpact_asset).WaitForCompletion();
			PostProcessDuration val2 = ((Component)component2).gameObject.AddComponent<PostProcessDuration>();
			val2.ppVolume = component2;
			val2.ppWeightCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
			val2.maxDuration = 0.19f;
			if (Object.op_Implicit((Object)(object)superFormTransformationEffect))
			{
				ShakeEmitter val3 = superFormTransformationEffect.AddComponent<ShakeEmitter>();
				val3.amplitudeTimeDecay = true;
				val3.duration = 0.5f;
				val3.radius = 200f;
				val3.scaleShakeRadiusWithLocalScale = false;
				val3.wave = new Wave
				{
					amplitude = 0.9f,
					frequency = 40f,
					cycleOffset = 0f
				};
				ShakeEmitter val4 = superFormTransformationEffect.AddComponent<ShakeEmitter>();
				val4.amplitudeTimeDecay = true;
				val4.duration = 1.4f;
				val4.radius = 300f;
				val4.scaleShakeRadiusWithLocalScale = false;
				val4.wave = new Wave
				{
					amplitude = 0.5f,
					frequency = 3f,
					cycleOffset = 0f
				};
			}
			transformationEmeraldSwirl = LoadEffect("SonicChaosEmeraldSwirl");
			superFormAura = LoadAsyncedEffect("SuperFormAura");
			VFXAttributes val5 = superFormAura.AddComponent<VFXAttributes>();
			val5.DoNotPool = false;
			val5.optionalLights = (Light[])(object)new Light[1] { ((Component)superFormAura.transform.Find("Point Light")).GetComponent<Light>() };
			ReplaceRainbow(superFormAura.transform.Find("Rainbow"), subtle: true);
			superAuraMaterialBase = new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_DLC3_Parry.matParryWave_mat).WaitForCompletion());
			superAuraMaterialBase.SetFloat("_Boost", 1.5f);
			superAuraMaterialBase.SetFloat("_AlphaBoost", 1.2f);
			superAuraMaterialBase.SetFloat("_DepthOffset", -3f);
			superAuraMaterialBase.SetTextureScale("_Cloud1Tex", new Vector2(0.7f, 0.7f));
			superAuraMaterialBase.SetTexture("_Cloud2Tex", AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_Base_Common.texCloudWaterFoam2_psd), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			superAuraMaterialBase.SetTextureScale("_Cloud2Tex", new Vector2(0.7f, 0.7f));
			superAuraMaterialBase.SetTexture("_RemapTex", AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_Base_Common_ColorRamps.texRampTritoneSmoothed_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			superAuraMaterialBase.SetVector("_CutoffScroll", new Vector4(0f, -3f, 1f, -5f));
			superAuraMaterialBase.EnableKeyword("VERTEXCOLOR");
			superAuraMaterial = CreateSuperAuraMaterial("SuperFormAura", AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_DLC1_Common_ColorRamps.texRampConstructLaser_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			superAuraMaterial.SetFloat("_Boost", 2.5f);
			((Renderer)superFormAura.GetComponent<ParticleSystemRenderer>()).sharedMaterial = superAuraMaterial;
			((Renderer)((Component)superFormAura.transform.Find("Sparks")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = AssetAsyncReferenceManager<Material>.LoadAsset(new AssetReferenceT<Material>(RoR2_Base_Common_VFX.matTracerLessBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion();
			superFormWarning = LoadEffect("SonicSuperWarning", "", parentToTransform: true, 0f);
			superFormWarning.AddComponent<DestroyOnExitForm>();
			EffectComponent component3 = superFormWarning.GetComponent<EffectComponent>();
			component3.parentToReferencedTransform = true;
			component3.applyScale = true;
			AsyncOperationHandle<Material> val6 = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_LunarGolem.matLunarGolemShield_mat);
			val6.Completed += delegate(AsyncOperationHandle<Material> x)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Expected O, but got Unknown
				//IL_0030: 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)
				superFormOverlay = new Material(x.Result);
				superFormOverlay.SetColor("_TintColor", new Color(1f, 0.8f, 0.4f, 1f));
				superFormOverlay.SetColor("_EmissionColor", new Color(1f, 0.8f, 0.4f, 1f));
				superFormOverlay.SetFloat("_OffsetAmount", 0.01f);
			};
			AsyncOperationHandle<Material> val7 = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Huntress.matHuntressFlashBright_mat);
			val7.Completed += delegate(AsyncOperationHandle<Material> x)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Expected O, but got Unknown
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				superFormGlowingMaterial = new Material(x.Result);
				superFormGlowingMaterial.SetColor("_TintColor", new Color(1f, 0.8f, 0.4f, 1f));
			};
			superLoopSoundDef = ScriptableObject.CreateInstance<LoopSoundDef>();
			superLoopSoundDef.startSoundName = "Play_hedgehogutils_super_loop";
			superLoopSoundDef.stopSoundName = "Stop_hedgehogutils_super_loop";
			superFormPPVolume = mainAssetBundle.LoadAsset<GameObject>("SonicSuperPostProcess");
			PostProcessVolume component4 = superFormPPVolume.GetComponent<PostProcessVolume>();
			component4.sharedProfile = Addressables.LoadAssetAsync<PostProcessProfile>((object)RoR2_Base_title_PostProcessing.ppLocalGrandparent_asset).WaitForCompletion();
			PostProcessDuration val8 = superFormPPVolume.AddComponent<PostProcessDuration>();
			val8.ppVolume = component4;
			val8.ppWeightCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.5f);
			val8.maxDuration = 1f;
			chaosEmeraldDropletPrefab = mainAssetBundle.LoadAsset<GameObject>("ChaosEmeraldOrb");
			PlaySoundOnEvent val9 = chaosEmeraldDropletPrefab.AddComponent<PlaySoundOnEvent>();
			val9.triggeringEvent = (PlaySoundEvent)2;
			val9.soundEvent = "Play_UI_item_spawn_tier2";
			PlaySoundOnEvent val10 = chaosEmeraldDropletPrefab.AddComponent<PlaySoundOnEvent>();
			val10.triggeringEvent = (PlaySoundEvent)int.MinValue;
			val10.soundEvent = "Play_hedgehogutils_emerald_spawn";
			PlaySoundOnEvent val11 = chaosEmeraldDropletPrefab.AddComponent<PlaySoundOnEvent>();
			val11.triggeringEvent = (PlaySoundEvent)int.MinValue;
			val11.soundEvent = "Play_UI_item_land_tier2";
			Transform chaosEmeraldDropletVFXTransform = chaosEmeraldDropletPrefab.transform.GetChild(0);
			AsyncOperationHandle<GameObject> val12 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Common.BossOrb_prefab);
			val12.Completed += delegate(AsyncOperationHandle<GameObject> x)
			{
				//IL_0050: Unknown result type (might be due to invalid IL or missing references)
				//IL_0056: Expected O, but got Unknown
				((Renderer)((Component)chaosEmeraldDropletVFXTransform).GetComponent<TrailRenderer>()).sharedMaterial = ((Renderer)((Component)x.Result.transform.GetChild(0)).GetComponent<TrailRenderer>()).sharedMaterial;
				Material val14 = new Material(((Renderer)((Component)x.Result.transform.GetChild(0).GetChild(1)).GetComponent<ParticleSystemRenderer>()).sharedMaterial);
				val14.SetTexture("_RemapTex", mainAssetBundle.LoadAsset<Texture>("texRampRainbow"));
				val14.SetFloat("_SrcBlend", 1f);
				val14.SetFloat("_DstBlend", 1f);
				val14.SetFloat("_AlphaBoost", 3f);
				val14.SetFloat("_AlphaBias", 0.4f);
				((Renderer)((Component)chaosEmeraldDropletVFXTransform.GetChild(1)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = val14;
			};
			AsyncOperationHandle<Material> val13 = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_Child.matChildStarGlow_mat);
			val13.Completed += delegate(AsyncOperationHandle<Material> x)
			{
				((Renderer)((Component)chaosEmeraldDropletVFXTransform.GetChild(0)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = x.Result;
			};
		}

		private static void UpdateAuraColors(GameObject aura, Color color)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: 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)
			((Component)aura.transform.Find("Point Light")).GetComponent<Light>().color = color;
			MainModule main = ((Component)aura.transform.Find("DistanceGlow")).GetComponent<ParticleSystem>().main;
			((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color);
			MainModule main2 = ((Component)aura.transform.Find("Sparks")).GetComponent<ParticleSystem>().main;
			((MainModule)(ref main2)).startColor = MinMaxGradient.op_Implicit(color);
		}

		public static Material CreateSuperAuraMaterial(string name, Texture remapTexture)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Material val = new Material(superAuraMaterialBase);
			((Object)val).name = "mat" + name;
			if (Object.op_Implicit((Object)(object)remapTexture))
			{
				val.SetTexture("_RemapTex", remapTexture);
			}
			return val;
		}

		public static GameObject CreateSuperAura(string name, Color color)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return CreateSuperAura(name, color, color, null);
		}

		public static GameObject CreateSuperAura(string name, Color color, Texture remapTexture)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return CreateSuperAura(name, color, Color.white, CreateSuperAuraMaterial(name, remapTexture));
		}

		public static GameObject CreateSuperAura(string name, Color color, Color auraTintColor, Material material)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PrefabAPI.InstantiateClone(superFormAura, name);
			if (auraTintColor != Color.white)
			{
				MainModule main = val.GetComponent<ParticleSystem>().main;
				((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(auraTintColor);
			}
			if (Object.op_Implicit((Object)(object)material))
			{
				((Renderer)val.GetComponent<ParticleSystemRenderer>()).sharedMaterial = material;
			}
			UpdateAuraColors(val, color);
			return val;
		}

		public static void ReplaceRainbow(Transform particle, bool subtle = false)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			ParticleSystemRenderer component = ((Component)particle).GetComponent<ParticleSystemRenderer>();
			((Renderer)component).sharedMaterial = (subtle ? rainbowGlowSubtleMaterial : rainbowGlowMaterial);
			component.mesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_Base_Common_VFX.mdlVFXDonut1_fbx_donut1Mesh_).WaitForCompletion();
		}

		public static void Miscellaneous()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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_0024: Expected O, but got Unknown
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Expected O, but got Unknown
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: 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_0190: 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_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Expected O, but got Unknown
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0377: Unknown result type (might be due to invalid IL or missing references)
			rainbowGlowMaterial = new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_Elites_EliteBead.matEliteBeadSpikeGrowthRing_mat).WaitForCompletion());
			rainbowGlowMaterial.SetTexture("_RemapTex", mainAssetBundle.LoadAsset<Texture>("texRampRainbow"));
			rainbowGlowMaterial.SetFloat("_Boost", 10f);
			rainbowGlowSubtleMaterial = new Material(rainbowGlowMaterial);
			rainbowGlowSubtleMaterial.SetFloat("_Boost", 1.5f);
			AsyncOperationHandle<Material> val = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2_Elites_EliteAurelionite.matEliteAurelioniteAffixOverlay_mat);
			val.Completed += delegate(AsyncOperationHandle<Material> x)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Expected O, but got Unknown
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				ringMaterial = new Material(x.Result);
				ringMaterial.SetFloat("_NormalStrength", 0f);
				ringMaterial.SetColor("_Color", new Color(0.9f, 0.8f, 0.1f, 1f));
			};
			chaosSnapMaterial = new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Huntress.matHuntressSwipe_mat).WaitForCompletion());
			chaosSnapMaterial.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampLightning2_png).WaitForCompletion());
			chaosSnapInEffect = CreateChaosSnapEffect("ChaosSnapInVFX", teleportIn: true);
			chaosSnapOutEffect = CreateChaosSnapEffect("ChaosSnapOutVFX", teleportIn: false);
			lockOnIndicator = mainAssetBundle.LoadAsset<GameObject>("LockOnIndicator");
			LockOnIndicator lockOnIndicatorComponent = lockOnIndicator.AddComponent<LockOnIndicator>();
			AsyncOperationHandle<Sprite> val2 = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_UI.texCursorRevolver_png_texCursorRevolver_);
			val2.Completed += delegate(AsyncOperationHandle<Sprite> x)
			{
				SpriteRenderer component = ((Component)lockOnIndicator.transform.GetChild(0)).GetComponent<SpriteRenderer>();
				component.sprite = x.Result;
				lockOnIndicatorComponent.main = component;
			};
			AsyncOperationHandle<Sprite> val3 = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_UI.texCrosshair2_png_texCrosshair2_);
			val3.Completed += delegate(AsyncOperationHandle<Sprite> x)
			{
				SpriteRenderer component = ((Component)lockOnIndicator.transform.GetChild(1)).GetComponent<SpriteRenderer>();
				component.sprite = x.Result;
				lockOnIndicatorComponent.darken = component;
			};
			Transform lockOnNibHolder = lockOnIndicator.transform.GetChild(3);
			AsyncOperationHandle<Sprite> val4 = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_UI.texCrosshairNibBar_png_texCrosshairNibBar_);
			val4.Completed += delegate(AsyncOperationHandle<Sprite> x)
			{
				lockOnIndicatorComponent.nibTop = LockOnNibs(lockOnNibHolder.GetChild(0), x.Result);
				lockOnIndicatorComponent.nibLeft = LockOnNibs(lockOnNibHolder.GetChild(1), x.Result);
				lockOnIndicatorComponent.nibBottom = LockOnNibs(lockOnNibHolder.GetChild(2), x.Result);
				lockOnIndicatorComponent.nibRight = LockOnNibs(lockOnNibHolder.GetChild(3), x.Result);
				lockOnIndicatorComponent.scaleCurves = lockOnIndicator.GetComponentsInChildren<ObjectScaleCurve>();
			};
			ObjectScaleCurve val5 = ((Component)lockOnIndicator.transform.GetChild(2)).gameObject.AddComponent<ObjectScaleCurve>();
			val5.timeMax = 0.2f;
			val5.useOverallCurveOnly = true;
			val5.overallCurve = AnimationCurve.Linear(0f, 3f, 1f, 0f);
			lockOnIndicatorComponent.start = ((Component)val5).GetComponent<SpriteRenderer>();
			glitchOverlayMaterial = new Material(AssetAsyncReferenceManager<Material>.LoadAsset(new AssetReferenceT<Material>(RoR2_Base_Common_VFX.matOmniHitspark1Generic_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			((Object)glitchOverlayMaterial).name = "matHedgehogUtilsGlitchOverlay";
			glitchOverlayMaterial.SetInt("_ZTest", 7);
			glitchOverlayMaterial.SetFloat("_InvFade", 2f);
			glitchOverlayMaterial.SetFloat("_DepthOffset", -2f);
			glitchOverlayMaterial.SetFloat("_Boost", 5f);
			glitchOverlayMaterial.SetFloat("_AlphaBoost", 1.5f);
			glitchOverlayMaterial.SetFloat("_AlphaBias", 0f);
			glitchOverlayMaterial.SetTexture("_MainTex", AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_Base_Common_VFX.texOmniExplosion2Mask_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			glitchOverlayMaterial.SetTexture("_RemapTex", AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_Base_Common_ColorRamps.texRampDefault_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			glitchOverlayMaterial.SetTexture("_Cloud1Tex", AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_DLC3_Drone_Tech.texNanoScanLines_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			glitchOverlayMaterial.SetTexture("_Cloud2Tex", AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_Base_Common_TiledTextures.texCloudIce_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion());
			glitchOverlayMaterial.SetVector("_CutoffScroll", new Vector4(0f, -100f, 40f, -200f));
			glitchOverlayMaterial.SetFloat("_DistortionStrength", 0.5f);
			glitchOverlayMaterial.EnableKeyword("USE_CLOUDS");
			glitchOverlayMaterial.EnableKeyword("CLOUDOFFSET");
		}

		private static SpriteRenderer LockOnNibs(Transform nibHolder, Sprite sprite)
		{
			ObjectScaleCurve val = ((Component)nibHolder).gameObject.AddComponent<ObjectScaleCurve>();
			val.timeMax = 0.2f;
			val.useOverallCurveOnly = false;
			val.curveX = AnimationCurve.Constant(0f, 1f, 1f);
			val.curveY = AnimationCurve.EaseInOut(0f, 6f, 1f, 1f);
			val.curveZ = AnimationCurve.Constant(0f, 1f, 1f);
			val.overallCurve = AnimationCurve.Constant(0f, 1f, 1f);
			SpriteRenderer component = ((Component)nibHolder.GetChild(0)).GetComponent<SpriteRenderer>();
			component.sprite = sprite;
			return component;
		}

		public static GameObject CreateChaosSnapEffect(string assetBundlePrefabName, bool teleportIn)
		{
			//IL_0016: 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_014b: 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_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: 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)
			GameObject val = mainAssetBundle.LoadAsset<GameObject>(assetBundlePrefabName);
			VFXAttributes val2 = val.AddComponent<VFXAttributes>();
			val2.vfxPriority = (VFXPriority)1;
			ParticleSystem component = ((Component)val.transform.Find("TeleportLine")).GetComponent<ParticleSystem>();
			ParticleSystemRenderer component2 = ((Component)component).GetComponent<ParticleSystemRenderer>();
			ParticleSystem component3 = ((Component)val.transform.Find("Distortion")).GetComponent<ParticleSystem>();
			ParticleSystemRenderer component4 = ((Component)component3).GetComponent<ParticleSystemRenderer>();
			ParticleSystem component5 = ((Component)val.transform.Find("Flash")).GetComponent<ParticleSystem>();
			ParticleSystemRenderer component6 = ((Component)component5).GetComponent<ParticleSystemRenderer>();
			val.AddComponent<DestroyOnParticleEnd>().trackedParticleSystem = component;
			ScaleParticleSystemDuration val3 = val.AddComponent<ScaleParticleSystemDuration>();
			val3.initialDuration = 0.5f;
			val3.particleSystems = (ParticleSystem[])(object)new ParticleSystem[3] { component, component3, component5 };
			Transform val4 = val.transform.Find("Point Light");
			val2.optionalLights = (Light[])(object)new Light[1] { ((Component)val4).GetComponent<Light>() };
			LightIntensityCurve val5 = ((Component)val4).gameObject.AddComponent<LightIntensityCurve>();
			val5.curve = (teleportIn ? AnimationCurve.EaseInOut(0f, 0f, 1f, 1f) : AnimationCurve.EaseInOut(0f, 1f, 1f, 0f));
			val5.timeMax = 0.5f;
			((Renderer)component2).sharedMaterial = chaosSnapMaterial;
			((Renderer)component4).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Common_VFX.matInverseDistortion_mat).WaitForCompletion();
			((Renderer)component6).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC3_Items_ShockDamageAura.matDroneShockDamageGlowBurst_mat).WaitForCompletion();
			EffectComponent val6 = val.AddComponent<EffectComponent>();
			val6.applyScale = true;
			val6.applyScaleFirst = true;
			val6.positionAtReferencedTransform = false;
			ChaosSnapVFX chaosSnapVFX = val.AddComponent<ChaosSnapVFX>();
			chaosSnapVFX.reverse = teleportIn;
			chaosSnapVFX.temporaryOverlayMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Huntress.matHuntressFlashBright_mat).WaitForCompletion();
			chaosSnapVFX.soundString = "Play_hedgehogutils_teleport";
			AddNewEffectDef(val);
			return val;
		}

		public static GameObject MaterialSwap(GameObject prefab, string assetPath, string pathToParticle = "")
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			Transform val = prefab.transform.Find(pathToParticle);
			if (Object.op_Implicit((Object)(object)val))
			{
				((Renderer)((Component)val).GetComponent<ParticleSystemRenderer>()).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)assetPath).WaitForCompletion();
			}
			return prefab;
		}

		public static GameObject MaterialSwap(GameObject prefab, Material material, string pathToParticle = "")
		{
			Transform val = prefab.transform.Find(pathToParticle);
			if (Object.op_Implicit((Object)(object)val))
			{
				((Renderer)((Component)val).GetComponent<ParticleSystemRenderer>()).sharedMaterial = material;
			}
			return prefab;
		}

		[Obsolete]
		public static GameObject CreateNewBoostFlash(string name, float size, float alpha, Color color1, Color color2, Color color3, Color lightColor)
		{
			//IL_0029: 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_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: 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_0072: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: 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_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: 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_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PrefabAPI.InstantiateClone(powerBoostFlashEffect, name);
			AddNewEffectDef(val);
			MainModule main = ((Component)val.transform.Find("BlueCone")).GetComponent<ParticleSystem>().main;
			MinMaxCurve startSize = ((MainModule)(ref main)).startSize;
			((MainModule)(ref main)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * size);
			MainModule main2 = ((Component)val.transform.Find("BlueCone/BlueCone2")).GetComponent<ParticleSystem>().main;
			startSize = ((MainModule)(ref main2)).startSize;
			((MainModule)(ref main2)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * size);
			ParticleSystemRenderer component = ((Component)val.transform.Find("BlueCone")).GetComponent<ParticleSystemRenderer>();
			((Renderer)component).sharedMaterial = CreateNewBoostMaterial(alpha, color1, color2, color3);
			ParticleSystemRenderer component2 = ((Component)val.transform.Find("BlueCone/BlueCone2")).GetComponent<ParticleSystemRenderer>();
			((Renderer)component2).sharedMaterial = CreateNewBoostMaterial(alpha, color1, color2, color3);
			MainModule main3 = ((Component)val.transform.Find("BlueCone/StartFlash")).GetComponent<ParticleSystem>().main;
			if (lightColor == Color.black)
			{
				LightsModule lights = ((Component)val.transform.Find("BlueCone/StartFlash")).GetComponent<ParticleSystem>().lights;
				((LightsModule)(ref lights)).enabled = false;
			}
			else
			{
				((MainModule)(ref main3)).startColor = MinMaxGradient.op_Implicit(lightColor);
				((Component)val.transform.Find("BlueCone/StartFlash/Point Light")).GetComponent<Light>().color = lightColor;
			}
			return val;
		}

		[Obsolete]
		public static GameObject CreateNewBoostAura(string name, float size, float alpha, Color color1, Color color2, Color color3, Color lightColor)
		{
			//IL_001e: 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_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_009b: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PrefabAPI.InstantiateClone(powerBoostAuraEffect, name);
			Transform obj = val.transform.Find("Aura");
			obj.localScale *= size;
			((Renderer)((Component)val.transform.Find("Aura")).GetComponent<MeshRenderer>()).sharedMaterial = CreateNewBoostMaterial(alpha, color1, color2, color3);
			if (lightColor == Color.black)
			{
				((Behaviour)((Component)val.transform.Find("Point Light")).GetComponent<Light>()).enabled = false;
			}
			else
			{
				((Component)val.transform.Find("Point Light")).GetComponent<Light>().color = lightColor;
			}
			return val;
		}

		[Obsolete]
		private static Material CreateNewBoostMaterial(float alpha, Color color1, Color color2, Color color3)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			Material val = new Material(mainAssetBundle.LoadAsset<Material>("matPowerBoost"));
			val.SetFloat("_AlphaBoost", alpha);
			val.SetColor("_Color1", color1);
			val.SetColor("_Color2", color2);
			val.SetColor("_Color3", color3);
			return val;
		}

		private static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName)
		{
			NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
			val.akId = AkSoundEngine.GetIDFromString(eventName);
			val.eventName = eventName;
			Content.AddNetworkSoundEventDef(val);
			return val;
		}

		private static GameObject LoadEffect(string resourceName)
		{
			return LoadEffect(resourceName, "", parentToTransform: false, 5f);
		}

		private static GameObject LoadEffect(string resourceName, string soundName)
		{
			return LoadEffect(resourceName, soundName, parentToTransform: false, 5f);
		}

		private static GameObject LoadEffect(string resourceName, bool parentToTransform)
		{
			return LoadEffect(resourceName, "", parentToTransform, 5f);
		}

		private static GameObject LoadEffect(string resourceName, bool parentToTransform, float destroyOnTimer)
		{
			return LoadEffect(resourceName, "", parentToTransform, destroyOnTimer);
		}

		private static GameObject LoadAsyncedEffect(string resourceName)
		{
			GameObject val = mainAssetBundle.LoadAsset<GameObject>(resourceName);
			val.AddComponent<NetworkIdentity>();
			return val;
		}

		private static GameObject LoadEffect(string resourceName, string soundName, bool parentToTransform, float destroyOnTimer, bool addNewEffectDef = true)
		{
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = mainAssetBundle.LoadAsset<GameObject>(resourceName);
			if (!Object.op_Implicit((Object)(object)val))
			{
				Log.Error("Failed to load effect: " + resourceName + " because it does not exist in the AssetBundle");
				return null;
			}
			if (destroyOnTimer > 0f)
			{
				val.AddComponent<DestroyOnTimer>().duration = destroyOnTimer;
			}
			val.AddComponent<NetworkIdentity>();
			VFXAttributes val2 = val.AddComponent<VFXAttributes>();
			val2.vfxPriority = (VFXPriority)2;
			EffectComponent val3 = val.AddComponent<EffectComponent>();
			val3.applyScale = false;
			val3.effectIndex = (EffectIndex)(-1);
			val3.parentToReferencedTransform = parentToTransform;
			val3.positionAtReferencedTransform = true;
			val3.soundName = soundName;
			if (addNewEffectDef)
			{
				AddNewEffectDef(val, soundName);
			}
			return val;
		}

		private static void AddNewEffectDef(GameObject effectPrefab)
		{
			AddNewEffectDef(effectPrefab, "");
		}

		private static void AddNewEffectDef(GameObject effectPrefab, string soundName)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			EffectDef val = new EffectDef();
			val.prefab = effectPrefab;
			val.prefabEffectComponent = effectPrefab.GetComponent<EffectComponent>();
			val.prefabName = ((Object)effectPrefab).name;
			val.prefabVfxAttributes = effectPrefab.GetComponent<VFXAttributes>();
			val.spawnSoundEventName = soundName;
			Content.AddEffectDef(val);
		}
	}
	public static class Buffs
	{
		public static BuffDef superFormBuff;

		public static BuffDef launchedBuff;

		public static BuffDef chaosSnapRandomIdentifierBuff;

		internal static void RegisterBuffs()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			superFormBuff = AddNewBuff("bdHedgehogSuperForm", Assets.mainAssetBundle.LoadAsset<Sprite>("texSuperBuffIcon"), Color.white, canStack: false, isDebuff: false, hidden: false);
			launchedBuff = AddNewBuff("bdHedgehogLaunch", LegacyResourcesAPI.Load<BuffDef>("BuffDefs/Weak").iconSprite, new Color(1f, 1f, 1f), canStack: false, isDebuff: false, hidden: true);
			chaosSnapRandomIdentifierBuff = AddNewBuff("bdHedgehogChaosSnap", LegacyResourcesAPI.Load<BuffDef>("BuffDefs/Weak").iconSprite, new Color(1f, 1f, 1f), canStack: false, isDebuff: false, hidden: true);
		}

		internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool hidden)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = buffName;
			val.buffColor = buffColor;
			val.canStack = canStack;
			val.isDebuff = isDebuff;
			val.eliteDef = null;
			val.iconSprite = buffIcon;
			val.isHidden = hidden;
			Content.AddBuffDef(val);
			return val;
		}
	}
	public static class Config
	{
		public enum Logs
		{
			None,
			Minimum,
			All
		}

		public static ConfigEntry<Logs> EnableLogs()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<Logs>("Misc.", "Enable Logs", Logs.Minimum, "This controls how much information this mod will put in the logs. This information can help the mod creator fix issues should any come up, but it does impact performance a bit. Default is false.");
		}

		public static ConfigEntry<bool> AnnounceSuperTransformation()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<bool>("Forms", "Announce Super Transformation", false, "If true, a message will be sent in chat when someone transforms. The message will include the name of the player who transformed. The message won't be sent for anyone who transforms in the 10 second window after someone else transforms. Host's config takes priority. Default is false.");
		}

		public static ConfigEntry<int> EmeraldsPerStage()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<int>("Chaos Emeralds", "Emeralds Per Stage", 3, "The maximum number of Chaos Emeralds that can spawn in one stage. Host's config takes priority. Default is 3.");
		}

		public static ConfigEntry<int> EmeraldsPerSimulacrumStage()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<int>("Chaos Emeralds", "Emeralds Per Simulacrum Stage", 5, "The maximum number of Chaos Emeralds that can spawn in one stage in Simulacrum. Host's config takes priority. Default is 5.");
		}

		public static ConfigEntry<int> EmeraldCost()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<int>("Chaos Emeralds", "Cost", 50, "How much it costs to buy a Chaos Emerald. Host's config takes priority. Default is 50.\nFor reference:\nChest: 25\nLarge Chest: 50\nAltar of Gold: 200\nLegendary Chest: 400");
		}

		public static ConfigEntry<FormItemSharing> NeededItemSharing()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<FormItemSharing>("Chaos Emeralds", "Item Sharing", FormItemSharing.All, "Handles how Chaos Emeralds are shared between teammates and determines who has permission to transform based on the items they have. The restrictions only apply to the first person to transform and don't apply to anyone who transforms in the 10 second window afterwards. Host's config takes priority. Default is All.\n\nAssuming all items have been collected across the team...\nAll: Anyone, whether they HAVE ANY ITEMS OR NOT, can transform.\nContributor: Players that have AT LEAST ONE of the needed items can transform\nMajorityRule: The player(s) with the MAJORITY number of the needed items can transform\nNone: Only the player with ALL items can transform\n\nWARNING: A mod that lets you drop items to your teammates is reccommended if you are changing this setting. Otherwise, transforming may be impossible if items are split between players in certain ways.");
		}

		public static ConfigEntry<bool> SuperFormInvincible()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<bool>("Super Form", "Invincible", true, $"Whether the Super form grants complete invincibility. Without invincibility, the Super form grants {200} armor. Host's config takes priority. Default is true.");
		}

		public static ConfigEntry<float> SuperFormDuration()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<float>("Super Form", "Duration", 50f, "How long the Super form will last in seconds. Host's config takes priority. Default is 50.");
		}

		public static ConfigEntry<bool> ConsumeEmeraldsOnUse()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<bool>("Super Form", "Consume Emeralds On Use", true, "Whether the Chaos Emeralds will be consumed when transforming into Super Sonic. If not, the emeralds will stay but won't be able to be used until the next stage. Host's config takes priority. Default is true.");
		}

		public static ConfigEntry<bool> SuperFormPostProcessing()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<bool>("Super Form", "Post Processing", true, "Whether the Super form subtly tints the screen yellow. Default is true.");
		}

		public static ConfigEntry<bool> LaunchBodyBlacklist()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<bool>("Launch", "Use Body Blacklist", true, "Determines whether certain characters, such as final bosses and worms, are impossible to be launched. Regardless of what this value is set to, launching may fail for other reasons, such as the target having knockback immunity or being too high mass. Host's config takes priority. Default is true.");
		}

		public static ConfigEntry<float> BoostMeterLocationX()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<float>("Boost", "X Location", 90f, "X Coordinate of the boost meter's location relative to the crosshair. Default is 90.");
		}

		public static ConfigEntry<float> BoostMeterLocationY()
		{
			return ((BaseUnityPlugin)HedgehogUtilsPlugin.instance).Config.Bind<float>("Boost", "Y Location", -50f, "Y Coordinate of the boost meter's location relative to the crosshair. Default is -50.");
		}

		public static void RiskOfOptionsSetup()
		{
			//IL_001d: 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_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: 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_007f: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Expected O, but got Unknown
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Expected O, but got Unknown
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Expected O, but got Unknown
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Expected O, but got Unknown
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Expected O, but got Unknown
			//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_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Expected O, but got Unknown
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Expected O, but got Unknown
			//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_01c0: 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_01d7: Expected O, but got Unknown
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Expected O, but got Unknown
			//IL_01e2: 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_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Expected O, but got Unknown
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Expected O, but got Unknown
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Expected O, but got Unknown
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Expected O, but got Unknown
			Sprite modIcon = Assets.mainAssetBundle.LoadAsset<Sprite>("texSuperBuffIcon");
			ModSettingsManager.SetModIcon(modIcon);
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(EmeraldsPerStage(), new IntSliderConfig
			{
				min = 1,
				max = 7
			}));
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(EmeraldsPerSimulacrumStage(), new IntSliderConfig
			{
				min = 1,
				max = 7
			}));
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(EmeraldCost(), new IntSliderConfig
			{
				min = 0,
				max = 400
			}));
			EmeraldCost().SettingChanged += ChaosEmeraldInteractable.UpdateInteractableCost;
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConsumeEmeraldsOnUse()));
			ConsumeEmeraldsOnUse().SettingChanged += SuperFormDef.UpdateConsumeEmeraldsConfig;
			ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)NeededItemSharing()));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AnnounceSuperTransformation()));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SuperFormInvincible()));
			SuperFormInvincible().SettingChanged += SuperFormDef.UpdateSuperFormInvincibleConfig;
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SuperFormPostProcessing()));
			ModSettingsManager.AddOption((BaseOption)new SliderOption(SuperFormDuration(), new SliderConfig
			{
				min = 15f,
				max = 600f,
				formatString = "{0:0}s"
			}));
			SuperFormDuration().SettingChanged += SuperFormDef.UpdateSuperFormDurationConfig;
			float min = -500f;
			float max = 500f;
			ModSettingsManager.AddOption((BaseOption)new SliderOption(BoostMeterLocationX(), new SliderConfig
			{
				min = min,
				max = max,
				formatString = "{0:0}"
			}));
			ModSettingsManager.AddOption((BaseOption)new SliderOption(BoostMeterLocationY(), new SliderConfig
			{
				min = min,
				max = max,
				formatString = "{0:0}"
			}));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(LaunchBodyBlacklist()));
			ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)EnableLogs()));
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.ds_gaming.HedgehogUtils", "HedgehogUtils", "2.0.1")]
	public class HedgehogUtilsPlugin : BaseUnityPlugin
	{
		public const string PluginGUID = "com.ds_gaming.HedgehogUtils";

		public const string PluginAuthor = "ds_gaming";

		public const string PluginName = "HedgehogUtils";

		public const string PluginVersion = "2.0.1";

		public const string Prefix = "DS_GAMING_HEDGEHOG_UTILS_";

		public static HedgehogUtilsPlugin instance;

		public static bool lookingGlassLoaded;

		public static bool riskOfOptionsLoaded;

		public void Awake()
		{
			instance = this;
			Log.Init(((BaseUnityPlugin)this).Logger);
			lookingGlassLoaded = Chainloader.PluginInfos.ContainsKey("droppod.lookingglass");
			Log.Message("Looking Glass exists? " + lookingGlassLoaded);
			riskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
			Log.Message("Risk of Options exists? " + riskOfOptionsLoaded);
			Assets.Initialize();
			Buffs.RegisterBuffs();
			Items.RegisterItems();
			SuperFormDef.Initialize();
			HedgehogUtils.Miscellaneous.DamageTypes.Initialize();
			ChaosEmeraldInteractable.Initialize();
			Stats.Initialize();
			Artifact.Initialize();
			HedgehogUtils.Launch.DamageTypes.Initialize();
			LaunchManager.Initialize();
			ChaosSnapManager.Initialize();
			MomentumStats.Initialize();
			VoicelineManager.Initialize();
			NetworkingAPI.RegisterMessageType<NetworkVoiceline>();
			NetworkingAPI.RegisterMessageType<NetworkLobbyVoiceline>();
			OnHooks.Initialize();
			Language.Initialize();
			States.RegisterStates();
			if (riskOfOptionsLoaded)
			{
				Config.RiskOfOptionsSetup();
			}
			NetworkingAPI.RegisterMessageType<NetworkTransformation>();
			new ContentPacks().Initialize();
		}
	}
	public static class Helpers
	{
		public const string wipIcon = "<sprite name=\"WIP\">";

		public static string ScepterDescription(string desc)
		{
			return "\n<color=#d299ff>SCEPTER: " + desc + "</color>";
		}

		public static string SuperFormText(string desc)
		{
			return "<color=#ffee00>" + desc + "</color>";
		}

		public static T[] Append<T>(ref T[] array, List<T> list)
		{
			int num = array.Length;
			int count = list.Count;
			Array.Resize(ref array, num + count);
			list.CopyTo(array, num);
			return array;
		}

		public static Func<T[], T[]> AppendDel<T>(List<T> list)
		{
			return (T[] r) => Append(ref r, list);
		}

		public static void RemoveTempOrPermanentItem(this Inventory inventory, ItemIndex item, int count)
		{
			//IL_000f: 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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)inventory))
			{
				int num = count;
				if (inventory.GetItemCountTemp(item) > 0)
				{
					int num2 = Math.Min(inventory.GetItemCountTemp(item), num);
					inventory.RemoveItemTemp(item, (float)num2);
					num -= num2;
				}
				if (num > 0)
				{
					inventory.RemoveItemPermanent(item, Math.Min(inventory.GetItemCountPermanent(item), num));
				}
			}
		}

		public static bool Flying(GameObject gameObject, out ICharacterFlightParameterProvider flight)
		{
			if (Object.op_Implicit((Object)(object)gameObject))
			{
				flight = gameObject.GetComponent<ICharacterFlightParameterProvider>();
				return Flying(flight);
			}
			flight = null;
			return false;
		}

		public static bool Flying(GameObject gameObject)
		{
			ICharacterFlightParameterProvider flight;
			return Flying(gameObject, out flight);
		}

		public static bool Flying(ICharacterFlightParameterProvider flight)
		{
			return flight != null && flight.isFlying;
		}

		public static void EndChrysalis(GameObject gameObject)
		{
			if (NetworkServer.active)
			{
				JetpackController val = JetpackController.FindJetpackController(gameObject);
				if (Object.op_Implicit((Object)(object)val) && val.stopwatch >= val.duration)
				{
					Object.Destroy((Object)(object)((Component)val).gameObject);
				}
			}
		}

		public static bool IsDoingSomething(CharacterMotor characterMotor, InputBankTest inputBank, bool allowGrounded, bool allowFlying, bool allowAirborne, bool allowMoving)
		{
			return !Object.op_Implicit((Object)(object)characterMotor) || (!allowAirborne && !characterMotor.isGrounded && (!allowFlying || !characterMotor.isFlying)) || (!allowGrounded && characterMotor.isGrounded) || !Object.op_Implicit((Object)(object)inputBank) || (!allowMoving && ((Vector3)(ref inputBank.moveVector)).sqrMagnitude >= Mathf.Epsilon) || inputBank.skill1.down || inputBank.skill2.down || inputBank.skill3.down || inputBank.skill4.down || inputBank.jump.down;
		}

		public static LocalUser FindLocalUser(CharacterBody characterBody)
		{
			if (Object.op_Implicit((Object)(object)characterBody))
			{
				foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList)
				{
					if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)characterBody)
					{
						return readOnlyLocalUsers;
					}
				}
			}
			return null;
		}

		public static T CopySkillDef<T>(SkillDef originDef) where T : SkillDef
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			T val = ScriptableObject.CreateInstance<T>();
			((SkillDef)val).skillName = originDef.skillName;
			((Object)(object)val).name = ((Object)originDef).name;
			((SkillDef)val).skillNameToken = originDef.skillNameToken;
			((SkillDef)val).skillDescriptionToken = originDef.skillDescriptionToken;
			((SkillDef)val).icon = originDef.icon;
			((SkillDef)val).activationState = originDef.activationState;
			((SkillDef)val).activationStateMachineName = originDef.activationStateMachineName;
			((SkillDef)val).baseMaxStock = originDef.baseMaxStock;
			((SkillDef)val).baseRechargeInterval = originDef.baseRechargeInterval;
			((SkillDef)val).beginSkillCooldownOnSkillEnd = originDef.beginSkillCooldownOnSkillEnd;
			((SkillDef)val).canceledFromSprinting = originDef.canceledFromSprinting;
			((SkillDef)val).forceSprintDuringState = originDef.forceSprintDuringState;
			((SkillDef)val).fullRestockOnAssign = originDef.fullRestockOnAssign;
			((SkillDef)val).interruptPriority = originDef.interruptPriority;
			((SkillDef)val).resetCooldownTimerOnUse = originDef.resetCooldownTimerOnUse;
			((SkillDef)val).isCombatSkill = originDef.isCombatSkill;
			((SkillDef)val).mustKeyPress = originDef.mustKeyPress;
			((SkillDef)val).cancelSprintingOnActivation = originDef.cancelSprintingOnActivation;
			((SkillDef)val).rechargeStock = originDef.rechargeStock;
			((SkillDef)val).requiredStock = originDef.requiredStock;
			((SkillDef)val).stockToConsume = originDef.stockToConsume;
			((SkillDef)val).keywordTokens = originDef.keywordTokens;
			((SkillDef)val).suppressSkillActivation = originDef.suppressSkillActivation;
			((SkillDef)val).hideCooldown = originDef.hideCooldown;
			((SkillDef)val).hideStockCount = originDef.hideStockCount;
			((SkillDef)val).autoHandleLuminousShot = originDef.autoHandleLuminousShot;
			((SkillDef)val).triggeredByPressRelease = originDef.triggeredByPressRelease;
			((SkillDef)val).isCooldownBlockedUntilManuallyReset = originDef.isCooldownBlockedUntilManuallyReset;
			return val;
		}

		public static T CopyBoostSkillDef<T>(HedgehogUtils.Boost.SkillDefs.BoostSkillDef originDef) where T : SkillDef, HedgehogUtils.Boost.SkillDefs.IBoostSkill
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			SerializableEntityStateType boostIdleState = originDef.boostIdleState;
			SerializableEntityStateType brakeState = originDef.brakeState;
			T val = CopySkillDef<T>((SkillDef)(object)originDef);
			val.boostIdleState = boostIdleState;
			val.brakeState = brakeState;
			val.boostHUDColor = originDef.boostHUDColor;
			return val;
		}

		public static T CopyBoostSkillDef<T>(HedgehogUtils.Boost.SkillDefs.RequiresFormBoostSkillDef originDef) where T : SkillDef, HedgehogUtils.Boost.SkillDefs.IBoostSkill
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			SerializableEntityStateType boostIdleState = originDef.boostIdleState;
			SerializableEntityStateType brakeState = originDef.brakeState;
			T val = CopySkillDef<T>((SkillDef)(object)originDef);
			val.boostIdleState = boostIdleState;
			val.brakeState = brakeState;
			val.boostHUDColor = originDef.boostHUDColor;
			return val;
		}

		public static Material MetalFresnel(this Material mat, Texture mask = null, float power = 1f, float boost = 1f)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			return mat.FresnelEmission(AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_DLC3_Drone_Tech.texDroneTechRamp_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(), mask, power, boost);
		}

		public static Material GoldFresnel(this Material mat, Texture mask = null, float power = 1f, float boost = 1f)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			return mat.FresnelEmission(AssetAsyncReferenceManager<Texture>.LoadAsset(new AssetReferenceT<Texture>(RoR2_Base_Common_ColorRamps.texRampDroneFire_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(), mask, power, boost);
		}

		public static Material FresnelEmission(this Material mat, Texture ramp, Texture mask, float power = 1f, float boost = 1f)
		{
			mat.SetTexture("_FresnelRamp", ramp);
			if (Object.op_Implicit((Object)(object)mask))
			{
				mat.SetTexture("_FresnelMask", mask);
			}
			mat.EnableKeyword("FRESNEL_EMISSION");
			mat.SetFloat("_FresnelPower", power);
			mat.SetFloat("_FresnelBoost", boost);
			return mat;
		}

		public static Material SpecularIgnoreAlpha(this Material mat)
		{
			mat.EnableKeyword("FORCE_SPEC");
			return mat;
		}

		public static Material CreateGlassMaterial()
		{
			//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_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			//IL_004e: 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)
			Material val = new Material(Addressables.LoadAssetAsync<Shader>((object)RoR2_Base_Shaders.HGCloudRemap_shader).WaitForCompletion());
			((Object)val).name = "matHedgehogUtilsGlass";
			val.SetFloat("_InvFade", 0f);
			val.SetInt("_Cull", 2);
			val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampDefault_png).WaitForCompletion());
			val.EnableKeyword("FRESNEL");
			val.SetFloat("_FresnelPower", 0.5f);
			val.SetFloat("_SrcBlend", 1f);
			val.SetFloat("_DstBlend", 10f);
			val.SetFloat("_AlphaBoost", 1f);
			return val;
		}

		public static Material CreateGlassMaterial(Color color)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			Material val = CreateGlassMaterial();
			val.SetColor("_TintColor", color);
			return val;
		}

		public static Material CreateGlassMaterial(Texture texture)
		{
			Material val = CreateGlassMaterial();
			val.SetTexture("_MainTex", texture);
			return val;
		}

		public static bool TryGetSkinDef(string bodyName, string skinNameToken, out SkinDef skin)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: 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_003b: Invalid comparison between Unknown and I4
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			skin = null;
			if (!((ResourceAvailability)(ref BodyCatalog.availability)).available)
			{
				Log.Error("Attempted to find skin before the BodyCatalog was available");
				return false;
			}
			BodyIndex val = BodyCatalog.FindBodyIndex(bodyName);
			if ((int)val != -1)
			{
				skin = SkinCatalog.FindSkinsForBody(val).First((SkinDef x) => x.nameToken == skinNameToken);
				return Object.op_Implicit((Object)(object)skin);
			}
			return false;
		}
	}
	public static class Language
	{
		public const string launchKeyword = "DS_