Decompiled source of Deadman Danny v0.2.7

plugins/DeadmanDanny/HenryMod.dll

Decompiled 12 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using DannyMod.Runtime;
using EntityStates;
using EntityStates.AI.Walker;
using EntityStates.Commando;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Huntress;
using HG;
using HG.BlendableTypes;
using HenryMod.Modules;
using HenryMod.Modules.Achievements;
using HenryMod.Modules.BaseStates;
using HenryMod.Modules.Characters;
using HenryMod.Survivors.Danny;
using HenryMod.Survivors.Henry.Components;
using HenryMod.Survivors.Henry.SkillStates;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using On.RoR2;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Networking;
using UnityEngine.Playables;
using UnityEngine.Rendering;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("HenryMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HenryMod")]
[assembly: AssemblyTitle("HenryMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
public class DannySupportHandGrip : MonoBehaviour
{
	private Transform upperArm;

	private Transform forearm;

	private Transform hand;

	private Transform weapon;

	private Vector3 gripPosition;

	private Quaternion gripRotation;

	private Vector3 fallbackBend;

	private bool calibrated;

	public float ErrorBeforeCorrection { get; private set; }

	public float PositionError { get; private set; }

	public bool Reachable { get; private set; }

	public Vector3 DesiredPosition { get; private set; }

	public void CaptureHoverGrip()
	{
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>();
		foreach (Transform val in componentsInChildren)
		{
			if (((Object)val).name == "arm_upper_L")
			{
				upperArm = val;
			}
			else if (((Object)val).name == "arm_lower_L")
			{
				forearm = val;
			}
			else if (((Object)val).name == "hand_L")
			{
				hand = val;
			}
			else if (((Object)val).name == "weapon")
			{
				weapon = val;
			}
		}
		calibrated = (Object)(object)upperArm != (Object)null && (Object)(object)forearm != (Object)null && (Object)(object)hand != (Object)null && (Object)(object)weapon != (Object)null;
		if (calibrated)
		{
			gripPosition = weapon.InverseTransformPoint(hand.position);
			gripRotation = Quaternion.Inverse(weapon.rotation) * hand.rotation;
			fallbackBend = upperArm.parent.InverseTransformDirection(forearm.position - upperArm.position);
		}
	}

	public void ApplyGrip()
	{
		//IL_0011: 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)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: 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)
		//IL_007c: 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_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_0101: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: 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_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: 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)
		//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_01d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01da: Unknown result type (might be due to invalid IL or missing references)
		//IL_01db: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_0216: 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_0226: Unknown result type (might be due to invalid IL or missing references)
		//IL_022b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0233: 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_0248: Unknown result type (might be due to invalid IL or missing references)
		//IL_024d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0263: Unknown result type (might be due to invalid IL or missing references)
		//IL_0269: Unknown result type (might be due to invalid IL or missing references)
		//IL_026e: Unknown result type (might be due to invalid IL or missing references)
		//IL_027f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0285: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0163: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		if (!calibrated)
		{
			return;
		}
		DesiredPosition = weapon.TransformPoint(gripPosition);
		ErrorBeforeCorrection = Vector3.Distance(hand.position, DesiredPosition);
		Vector3 position = upperArm.position;
		float num = Vector3.Distance(position, forearm.position);
		float num2 = Vector3.Distance(forearm.position, hand.position);
		Vector3 val = DesiredPosition - position;
		float magnitude = ((Vector3)(ref val)).magnitude;
		if (!(num < 1E-05f) && !(num2 < 1E-05f) && !(magnitude < 1E-05f))
		{
			val /= magnitude;
			float num3 = Mathf.Abs(num - num2) + 1E-05f;
			float num4 = num + num2 - 1E-05f;
			float num5 = Mathf.Clamp(magnitude, num3, num4);
			Reachable = magnitude >= num3 && magnitude <= num4;
			Vector3 val2 = Vector3.ProjectOnPlane(forearm.position - position, val);
			if (((Vector3)(ref val2)).sqrMagnitude < 1E-06f)
			{
				val2 = Vector3.ProjectOnPlane(upperArm.parent.TransformDirection(fallbackBend), val);
			}
			if (((Vector3)(ref val2)).sqrMagnitude < 1E-06f)
			{
				val2 = Vector3.Cross(val, Vector3.up);
			}
			if (((Vector3)(ref val2)).sqrMagnitude < 1E-06f)
			{
				val2 = Vector3.Cross(val, Vector3.right);
			}
			((Vector3)(ref val2)).Normalize();
			float num6 = (num * num - num2 * num2 + num5 * num5) / (2f * num5);
			float num7 = Mathf.Sqrt(Mathf.Max(0f, num * num - num6 * num6));
			Vector3 val3 = position + val * num6 + val2 * num7;
			upperArm.rotation = Quaternion.FromToRotation(forearm.position - position, val3 - position) * upperArm.rotation;
			Vector3 val4 = position + val * num5;
			forearm.rotation = Quaternion.FromToRotation(hand.position - forearm.position, val4 - forearm.position) * forearm.rotation;
			hand.rotation = weapon.rotation * gripRotation;
			PositionError = Vector3.Distance(hand.position, DesiredPosition);
		}
	}
}
namespace DannyMod.Runtime
{
	public static class DannyModelLayout
	{
		public static void PrepareRenderers(GameObject model)
		{
			SkinnedMeshRenderer[] componentsInChildren = model.GetComponentsInChildren<SkinnedMeshRenderer>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				((Component)componentsInChildren[i]).transform.SetParent(model.transform, true);
			}
		}
	}
	public class DannyAnimationRig : MonoBehaviour
	{
		public AnimationClip[] clips;

		public Vector2 localMovement;

		public bool airborne;

		public bool sprinting;

		public float aimPitch;

		public bool dashing;

		public bool sliding;

		public bool poweredFlight;

		public bool diving;

		public float verticalSpeed;

		public Vector3 diveDirection = Vector3.down;

		private readonly string[] presentationNames = new string[5] { "zipline_attached_start", "zipline_attached_loop", "zipline_tethered_reeling_loop", "knockdown_large_intro", "in_air_loop_apex" };

		private AnimationMixerPlayable presentationMixer;

		private AnimationClipPlayable[] presentationClips;

		private int presentationIndex = -1;

		private int presentationPrevious = -1;

		private bool presentationLoop;

		private bool presentationActive;

		private bool previousLoop;

		private float presentationAge;

		private float presentationWeight;

		private float previousAge;

		private float presentationBlend;

		public Vector3 presentationOffset;

		private Vector3 appliedOffset;

		private PlayableGraph graph;

		private AnimationMixerPlayable locomotion;

		private AnimationLayerMixerPlayable layers;

		private AnimationClipPlayable[] movement;

		private AnimationClipPlayable shot;

		private AnimationClipPlayable reload;

		private AnimationClipPlayable dash;

		private AnimationClipPlayable dive;

		private AnimationClipPlayable diveIntro;

		private AnimationClipPlayable diveDown;

		private AnimationMixerPlayable diveMixer;

		private AnimationMixerPlayable ultimateMixer;

		private AnimationClipPlayable[] ultimateClips;

		private int ultimatePhase;

		private float ultimateTime;

		private float ultimateWeight;

		private float[] ultimateAges = new float[5];

		private AnimationMixerPlayable tumbleMixer;

		private AnimationClipPlayable tumbleIntro;

		private AnimationClipPlayable tumbleLoop;

		private bool tumbling;

		private float tumbleTime;

		private float tumbleWeight;

		private AnimationMixerPlayable fuelMixer;

		private AnimationClipPlayable fuelIntro;

		private AnimationClipPlayable fuelLoop;

		private AnimationClipPlayable fuelEnd;

		private bool fuelActive;

		private float fuelTime;

		private float fuelExitTime = 10f;

		private float fuelWeight;

		private float fuelRecoveryWeight;

		private AnimationClipPlayable flightBase;

		private AnimationClipPlayable salvo;

		private float salvoTime = 10f;

		private float salvoWeight;

		private AnimationMixerPlayable slideMixer;

		private AnimationMixerPlayable reloadMixer;

		private AnimationLayerMixerPlayable slideLayer;

		private AnimationClipPlayable slideStart;

		private AnimationClipPlayable slideLoop;

		private AnimationClipPlayable slideGetup;

		private AnimationClipPlayable slideReload;

		private float slideTime;

		private float slideExitTime;

		private float slideWeight;

		private float slideExitLoop;

		private bool slideWasActive;

		private bool slideExiting;

		public float slideLean;

		private float smoothedSlideLean;

		private AnimationClip idleClip;

		private DannySupportHandGrip grip;

		private float clock;

		private float shotTime = 10f;

		private float shotDuration = 0.4f;

		private float reloadTime = 10f;

		private float reloadDuration = 1f;

		private float shotWeight;

		private float reloadWeight;

		private float dashWeight;

		private float diveWeight;

		private float diveTime;

		private Transform chest;

		private Transform rootBone;

		private Transform head;

		private Transform pelvis;

		public bool Presenting
		{
			get
			{
				if (!presentationActive)
				{
					return presentationWeight > 0.01f;
				}
				return true;
			}
		}

		public Vector3 VisualCenter
		{
			get
			{
				//IL_0020: 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_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: 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)
				if (!Object.op_Implicit((Object)(object)head) || !Object.op_Implicit((Object)(object)pelvis))
				{
					return ((Component)this).transform.position;
				}
				return (head.position + pelvis.position) * 0.5f;
			}
		}

		public Vector3 ZiplineGrip
		{
			get
			{
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: 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_0049: Unknown result type (might be due to invalid IL or missing references)
				Transform val = null;
				Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>();
				foreach (Transform val2 in componentsInChildren)
				{
					if ((((Object)val2).name == "hand_R" || ((Object)val2).name == "hand_L") && (!Object.op_Implicit((Object)(object)val) || val2.position.y > val.position.y))
					{
						val = val2;
					}
				}
				if (!Object.op_Implicit((Object)(object)val))
				{
					return VisualCenter + Vector3.up;
				}
				return val.position;
			}
		}

		public float GripError
		{
			get
			{
				if (!((Object)(object)grip == (Object)null))
				{
					return grip.PositionError;
				}
				return 0f;
			}
		}

		public bool Ready => ((PlayableGraph)(ref graph)).IsValid();

		public float SlideBlendWeight => slideWeight;

		public void Presentation(string name, bool loop = false, bool immediate = false)
		{
			Initialize();
			int num = Array.IndexOf(presentationNames, name);
			presentationActive = num >= 0;
			if (num >= 0)
			{
				presentationPrevious = ((presentationWeight > 0.01f && presentationIndex != num) ? presentationIndex : (-1));
				previousAge = presentationAge;
				previousLoop = presentationLoop;
				presentationIndex = num;
				presentationLoop = loop;
				presentationAge = 0f;
				presentationBlend = ((presentationPrevious < 0) ? 1 : 0);
			}
			if (immediate && num >= 0)
			{
				presentationPrevious = -1;
				presentationWeight = 1f;
				presentationBlend = 1f;
				Evaluate(0f);
			}
		}

		public void Tumble(bool active)
		{
			if (active && !tumbling)
			{
				tumbleTime = 0f;
			}
			tumbling = active;
		}

		public void Ultimate(int phase)
		{
			if (phase != ultimatePhase)
			{
				ultimatePhase = phase;
				ultimateTime = 0f;
				if (phase > 0)
				{
					ultimateAges[phase - 1] = 0f;
				}
			}
		}

		private AnimationClip Clip(string name)
		{
			AnimationClip[] array = clips;
			foreach (AnimationClip val in array)
			{
				if ((Object)(object)val != (Object)null && ((Object)val).name == name)
				{
					return val;
				}
			}
			throw new InvalidOperationException("Danny animation missing: " + name);
		}

		public void Initialize()
		{
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: 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_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0387: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Unknown result type (might be due to invalid IL or missing references)
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_041e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: Unknown result type (might be due to invalid IL or missing references)
			//IL_0438: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: 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_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0508: Unknown result type (might be due to invalid IL or missing references)
			//IL_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0514: Unknown result type (might be due to invalid IL or missing references)
			//IL_052c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0531: Unknown result type (might be due to invalid IL or missing references)
			//IL_0538: Unknown result type (might be due to invalid IL or missing references)
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0561: Unknown result type (might be due to invalid IL or missing references)
			//IL_0567: Unknown result type (might be due to invalid IL or missing references)
			//IL_056c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_057f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0592: Unknown result type (might be due to invalid IL or missing references)
			//IL_0599: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d8: 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_05ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0603: Unknown result type (might be due to invalid IL or missing references)
			//IL_060a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_061e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0623: Unknown result type (might be due to invalid IL or missing references)
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0636: Unknown result type (might be due to invalid IL or missing references)
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Unknown result type (might be due to invalid IL or missing references)
			//IL_065e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Unknown result type (might be due to invalid IL or missing references)
			//IL_066a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_067d: Unknown result type (might be due to invalid IL or missing references)
			//IL_068a: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0703: Unknown result type (might be due to invalid IL or missing references)
			//IL_074d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0765: Unknown result type (might be due to invalid IL or missing references)
			//IL_076a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0776: Unknown result type (might be due to invalid IL or missing references)
			//IL_077d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0813: Unknown result type (might be due to invalid IL or missing references)
			//IL_0818: Unknown result type (might be due to invalid IL or missing references)
			//IL_081f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0837: Unknown result type (might be due to invalid IL or missing references)
			//IL_083c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0843: Unknown result type (might be due to invalid IL or missing references)
			//IL_085b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0860: Unknown result type (might be due to invalid IL or missing references)
			//IL_0867: Unknown result type (might be due to invalid IL or missing references)
			//IL_086d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0872: Unknown result type (might be due to invalid IL or missing references)
			//IL_087e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0885: Unknown result type (might be due to invalid IL or missing references)
			//IL_0898: Unknown result type (might be due to invalid IL or missing references)
			//IL_089f: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0948: Unknown result type (might be due to invalid IL or missing references)
			//IL_0958: Unknown result type (might be due to invalid IL or missing references)
			//IL_095d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0970: Unknown result type (might be due to invalid IL or missing references)
			//IL_0977: Unknown result type (might be due to invalid IL or missing references)
			//IL_0996: Unknown result type (might be due to invalid IL or missing references)
			//IL_099d: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_09bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a51: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a90: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a95: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aaf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0adc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af0: Expected O, but got Unknown
			//IL_0c30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c3b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c41: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c57: Unknown result type (might be due to invalid IL or missing references)
			if (((PlayableGraph)(ref graph)).IsValid() || clips == null || clips.Length == 0)
			{
				return;
			}
			Animator component = ((Component)this).GetComponent<Animator>();
			component.applyRootMotion = false;
			component.cullingMode = (AnimatorCullingMode)0;
			SkinnedMeshRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren<SkinnedMeshRenderer>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				componentsInChildren[i].updateWhenOffscreen = true;
			}
			Transform[] componentsInChildren2 = ((Component)this).GetComponentsInChildren<Transform>();
			foreach (Transform val in componentsInChildren2)
			{
				if (((Object)val).name == "spine_2")
				{
					chest = val;
				}
				if (((Object)val).name == "root_motion")
				{
					rootBone = val;
				}
				if (((Object)val).name == "head")
				{
					head = val;
				}
				if (((Object)val).name == "pelvis")
				{
					pelvis = val;
				}
			}
			grip = ((Component)this).GetComponent<DannySupportHandGrip>() ?? ((Component)this).gameObject.AddComponent<DannySupportHandGrip>();
			graph = PlayableGraph.Create("Danny gameplay animation");
			((PlayableGraph)(ref graph)).SetTimeUpdateMode((DirectorUpdateMode)3);
			locomotion = AnimationMixerPlayable.Create(graph, 7);
			string[] array = new string[7] { "weapon_idle", "weapon_run_n", "weapon_run_s", "weapon_run_w", "weapon_run_e", "in_air_loop_apex", "flight_hover" };
			movement = (AnimationClipPlayable[])(object)new AnimationClipPlayable[array.Length];
			AnimationClip[] array2;
			for (int j = 0; j < array.Length; j++)
			{
				AnimationClip val2 = null;
				array2 = clips;
				foreach (AnimationClip val3 in array2)
				{
					if (Object.op_Implicit((Object)(object)val3) && ((Object)val3).name == array[j])
					{
						val2 = val3;
					}
				}
				movement[j] = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val2) ? val2 : Clip("weapon_idle"));
				if (j == 6 && Object.op_Implicit((Object)(object)val2))
				{
					AnimationLayerMixerPlayable val4 = AnimationLayerMixerPlayable.Create(graph, 2);
					flightBase = AnimationClipPlayable.Create(graph, Clip("weapon_idle"));
					((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationLayerMixerPlayable>(flightBase, 0, val4, 0);
					PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(val4, 0, 1f);
					((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationLayerMixerPlayable>(movement[j], 0, val4, 1);
					PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(val4, 1, 1f);
					((AnimationLayerMixerPlayable)(ref val4)).SetLayerAdditive(1u, true);
					((PlayableGraph)(ref graph)).Connect<AnimationLayerMixerPlayable, AnimationMixerPlayable>(val4, 0, locomotion, j);
				}
				else
				{
					((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(movement[j], 0, locomotion, j);
				}
			}
			idleClip = Clip("weapon_idle");
			shot = AnimationClipPlayable.Create(graph, Clip("shoot_in_air"));
			reload = AnimationClipPlayable.Create(graph, Clip("reload_in_air"));
			dash = AnimationClipPlayable.Create(graph, Clip("dash_air_forward"));
			AnimationClip val5 = null;
			array2 = clips;
			foreach (AnimationClip val6 in array2)
			{
				if (Object.op_Implicit((Object)(object)val6) && ((Object)val6).name == "dive_down_loop")
				{
					val5 = val6;
				}
			}
			dive = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val5) ? val5 : Clip("dash_air_forward"));
			diveIntro = AnimationClipPlayable.Create(graph, Clip("dive_intro"));
			diveDown = AnimationClipPlayable.Create(graph, Clip("dive_down"));
			diveMixer = AnimationMixerPlayable.Create(graph, 3);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(diveIntro, 0, diveMixer, 0);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(diveDown, 0, diveMixer, 1);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(dive, 0, diveMixer, 2);
			AnimationClip val7 = null;
			AnimationClip val8 = null;
			AnimationClip val9 = null;
			AnimationClip val10 = null;
			array2 = clips;
			foreach (AnimationClip val11 in array2)
			{
				if (((Object)val11).name == "slide_start")
				{
					val7 = val11;
				}
				if (((Object)val11).name == "slide_loop")
				{
					val8 = val11;
				}
				if (((Object)val11).name == "slide_getup")
				{
					val9 = val11;
				}
				if (((Object)val11).name == "reload_slide")
				{
					val10 = val11;
				}
			}
			slideStart = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val7) ? val7 : idleClip);
			slideLoop = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val8) ? val8 : idleClip);
			slideGetup = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val9) ? val9 : idleClip);
			slideReload = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val10) ? val10 : Clip("reload_in_air"));
			slideMixer = AnimationMixerPlayable.Create(graph, 3);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(slideStart, 0, slideMixer, 0);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(slideLoop, 0, slideMixer, 1);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(slideGetup, 0, slideMixer, 2);
			slideLayer = AnimationLayerMixerPlayable.Create(graph, 2);
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(locomotion, 0, slideLayer, 0);
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(slideLayer, 0, 1f);
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(slideMixer, 0, slideLayer, 1);
			reloadMixer = AnimationMixerPlayable.Create(graph, 2);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(reload, 0, reloadMixer, 0);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(slideReload, 0, reloadMixer, 1);
			layers = AnimationLayerMixerPlayable.Create(graph, 11);
			((PlayableGraph)(ref graph)).Connect<AnimationLayerMixerPlayable, AnimationLayerMixerPlayable>(slideLayer, 0, layers, 0);
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 0, 1f);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationLayerMixerPlayable>(shot, 0, layers, 1);
			((AnimationLayerMixerPlayable)(ref layers)).SetLayerAdditive(1u, true);
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(reloadMixer, 0, layers, 2);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationLayerMixerPlayable>(dash, 0, layers, 3);
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(diveMixer, 0, layers, 4);
			AnimationClip val12 = null;
			array2 = clips;
			foreach (AnimationClip val13 in array2)
			{
				if (((Object)val13).name == "ability_strix_salvo")
				{
					val12 = val13;
				}
			}
			salvo = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val12) ? val12 : idleClip);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationLayerMixerPlayable>(salvo, 0, layers, 5);
			AnimationClip val14 = null;
			AnimationClip val15 = null;
			AnimationClip val16 = null;
			array2 = clips;
			foreach (AnimationClip val17 in array2)
			{
				if (((Object)val17).name == "shoot_flamethrower_intro")
				{
					val14 = val17;
				}
				if (((Object)val17).name == "shoot_flamethrower_loop")
				{
					val15 = val17;
				}
				if (((Object)val17).name == "shoot_flamethrower_end_knockba")
				{
					val16 = val17;
				}
			}
			fuelIntro = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val14) ? val14 : idleClip);
			fuelLoop = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val15) ? val15 : idleClip);
			fuelEnd = AnimationClipPlayable.Create(graph, Object.op_Implicit((Object)(object)val16) ? val16 : idleClip);
			fuelMixer = AnimationMixerPlayable.Create(graph, 2);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(fuelIntro, 0, fuelMixer, 0);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(fuelLoop, 0, fuelMixer, 1);
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(fuelMixer, 0, layers, 6);
			((AnimationLayerMixerPlayable)(ref layers)).SetLayerAdditive(6u, true);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationLayerMixerPlayable>(fuelEnd, 0, layers, 7);
			ultimateMixer = AnimationMixerPlayable.Create(graph, 5);
			ultimateClips = (AnimationClipPlayable[])(object)new AnimationClipPlayable[5];
			string[] array3 = new string[5] { "ability_ult_grab", "ability_ult_fly_up_loop", "ability_ult_apex_flip", "dive_down_loop", "ability_ult_ground_impact" };
			for (int k = 0; k < 5; k++)
			{
				ultimateClips[k] = AnimationClipPlayable.Create(graph, Clip(array3[k]));
				((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(ultimateClips[k], 0, ultimateMixer, k);
			}
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(ultimateMixer, 0, layers, 8);
			tumbleIntro = AnimationClipPlayable.Create(graph, Clip("knockdown_inair_intro"));
			tumbleLoop = AnimationClipPlayable.Create(graph, Clip("knockdown_inair_loop"));
			tumbleMixer = AnimationMixerPlayable.Create(graph, 2);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(tumbleIntro, 0, tumbleMixer, 0);
			((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(tumbleLoop, 0, tumbleMixer, 1);
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(tumbleMixer, 0, layers, 9);
			presentationMixer = AnimationMixerPlayable.Create(graph, presentationNames.Length);
			presentationClips = (AnimationClipPlayable[])(object)new AnimationClipPlayable[presentationNames.Length];
			for (int l = 0; l < presentationNames.Length; l++)
			{
				presentationClips[l] = AnimationClipPlayable.Create(graph, Clip(presentationNames[l]));
				((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(presentationClips[l], 0, presentationMixer, l);
			}
			((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(presentationMixer, 0, layers, 10);
			AvatarMask val18 = new AvatarMask();
			Transform[] componentsInChildren3 = ((Component)this).GetComponentsInChildren<Transform>();
			val18.transformCount = componentsInChildren3.Length;
			Transform val19 = null;
			componentsInChildren2 = componentsInChildren3;
			foreach (Transform val20 in componentsInChildren2)
			{
				if (((Object)val20).name == "spine_0")
				{
					val19 = val20;
				}
			}
			for (int m = 0; m < componentsInChildren3.Length; m++)
			{
				string text = "";
				Transform val21 = componentsInChildren3[m];
				while ((Object)(object)val21 != (Object)(object)((Component)this).transform && (Object)(object)val21 != (Object)null)
				{
					text = ((Object)val21).name + ((text.Length > 0) ? ("/" + text) : "");
					val21 = val21.parent;
				}
				val18.SetTransformPath(m, text);
				val18.SetTransformActive(m, Object.op_Implicit((Object)(object)val19) && ((Object)(object)componentsInChildren3[m] == (Object)(object)val19 || componentsInChildren3[m].IsChildOf(val19)));
			}
			((AnimationLayerMixerPlayable)(ref layers)).SetLayerMaskFromAvatarMask(5u, val18);
			((AnimationLayerMixerPlayable)(ref layers)).SetLayerMaskFromAvatarMask(6u, val18);
			((AnimationLayerMixerPlayable)(ref layers)).SetLayerMaskFromAvatarMask(7u, val18);
			if (Application.isPlaying)
			{
				Object.Destroy((Object)(object)val18);
			}
			else
			{
				Object.DestroyImmediate((Object)(object)val18);
			}
			PlayableOutputExtensions.SetSourcePlayable<AnimationPlayableOutput, AnimationLayerMixerPlayable>(AnimationPlayableOutput.Create(graph, "Danny", component), layers);
			((PlayableGraph)(ref graph)).Play();
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(locomotion, 0, 1f);
			((PlayableGraph)(ref graph)).Evaluate(0f);
			grip.CaptureHoverGrip();
		}

		private void Start()
		{
			Initialize();
		}

		public void Fuel(bool active)
		{
			if (active && !fuelActive)
			{
				fuelTime = 0f;
			}
			if (!active && fuelActive)
			{
				fuelExitTime = 0f;
			}
			fuelActive = active;
		}

		public void Salvo()
		{
			salvoTime = 0f;
		}

		public void Fire(float duration)
		{
			Initialize();
			shotTime = 0f;
			shotDuration = Mathf.Max(0.12f, duration);
		}

		public void Reload(float duration)
		{
			Initialize();
			reloadTime = 0f;
			reloadDuration = Mathf.Max(0.1f, duration);
			shotTime = 10f;
		}

		public void Evaluate(float delta)
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: 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_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: 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_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_036e: 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_0421: Unknown result type (might be due to invalid IL or missing references)
			//IL_0444: 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_0492: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_067b: 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_069d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0700: Unknown result type (might be due to invalid IL or missing references)
			//IL_0721: Unknown result type (might be due to invalid IL or missing references)
			//IL_073c: Unknown result type (might be due to invalid IL or missing references)
			//IL_074a: Unknown result type (might be due to invalid IL or missing references)
			//IL_080f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0821: Unknown result type (might be due to invalid IL or missing references)
			//IL_0850: Unknown result type (might be due to invalid IL or missing references)
			//IL_0868: Unknown result type (might be due to invalid IL or missing references)
			//IL_08bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0973: Unknown result type (might be due to invalid IL or missing references)
			//IL_0996: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0abe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b31: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bfe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c96: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d43: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d33: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dcf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e9d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f11: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f16: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ef3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f27: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f2d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e54: Unknown result type (might be due to invalid IL or missing references)
			//IL_1054: Unknown result type (might be due to invalid IL or missing references)
			//IL_1059: Unknown result type (might be due to invalid IL or missing references)
			//IL_1064: Unknown result type (might be due to invalid IL or missing references)
			//IL_1069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f92: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f9d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fa8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fb2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fb6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fd1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fdc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fe1: Unknown result type (might be due to invalid IL or missing references)
			//IL_10ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_10fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_1103: Unknown result type (might be due to invalid IL or missing references)
			//IL_117b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1180: Unknown result type (might be due to invalid IL or missing references)
			//IL_118b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1190: Unknown result type (might be due to invalid IL or missing references)
			Initialize();
			if (!((PlayableGraph)(ref graph)).IsValid())
			{
				return;
			}
			clock += delta * (sprinting ? 1.45f : 1f);
			float num = Mathf.Clamp01(((Vector2)(ref localMovement)).magnitude);
			Vector2 val = ((num > 0.001f) ? ((Vector2)(ref localMovement)).normalized : Vector2.zero);
			float num2 = Mathf.Max(0f, val.y);
			float num3 = Mathf.Max(0f, 0f - val.y);
			float num4 = Mathf.Max(0f, 0f - val.x);
			float num5 = Mathf.Max(0f, val.x);
			float num6 = Mathf.Max(1f, num2 + num3 + num4 + num5);
			float num7 = (poweredFlight ? 1 : 0);
			float num8 = ((airborne && !poweredFlight && !diving && verticalSpeed <= 0.1f) ? 1 : 0);
			float num9 = 1f - Mathf.Max(num8, num7);
			float[] array = new float[7]
			{
				(1f - num) * num9,
				num2 / num6 * num * num9,
				num3 / num6 * num * num9,
				num4 / num6 * num * num9,
				num5 / num6 * num * num9,
				num8,
				num7
			};
			for (int i = 0; i < movement.Length; i++)
			{
				float num10 = Mathf.Lerp(PlayableExtensions.GetInputWeight<AnimationMixerPlayable>(locomotion, i), array[i], 1f - Mathf.Exp(-12f * delta));
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(locomotion, i, num10);
				PlayableExtensions.SetTime<AnimationClipPlayable>(movement[i], (double)(clock % Mathf.Max(0.01f, ((AnimationClipPlayable)(ref movement[i])).GetAnimationClip().length)));
			}
			shotTime += delta;
			reloadTime += delta;
			if (PlayableExtensions.IsValid<AnimationClipPlayable>(flightBase))
			{
				PlayableExtensions.SetTime<AnimationClipPlayable>(flightBase, (double)(clock % Mathf.Max(0.01f, idleClip.length)));
			}
			shotWeight = Mathf.MoveTowards(shotWeight, (float)((shotTime < shotDuration) ? 1 : 0), delta * 16f);
			reloadWeight = Mathf.MoveTowards(reloadWeight, (float)((reloadTime < reloadDuration) ? 1 : 0), delta * 12f);
			dashWeight = Mathf.MoveTowards(dashWeight, (float)(dashing ? 1 : 0), delta * 16f);
			diveWeight = Mathf.MoveTowards(diveWeight, (float)(diving ? 1 : 0), delta * 20f);
			diveTime = (diving ? (diveTime + delta) : 0f);
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 1, shotWeight * (1f - reloadWeight) * (1f - dashWeight) * (1f - diveWeight));
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 2, reloadWeight * (1f - dashWeight) * (1f - diveWeight));
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 3, dashWeight * (1f - diveWeight));
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 4, diveWeight);
			float length = ((AnimationClipPlayable)(ref diveIntro)).GetAnimationClip().length;
			float length2 = ((AnimationClipPlayable)(ref diveDown)).GetAnimationClip().length;
			float num11 = 0.1f;
			float num12 = 0.22f;
			float num13 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((diveTime - num11) / 0.15f));
			float num14 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((diveTime - num12) / 0.12f));
			PlayableExtensions.SetTime<AnimationClipPlayable>(diveIntro, (double)(Mathf.Min(diveTime / 0.25f, 1f) * length));
			PlayableExtensions.SetTime<AnimationClipPlayable>(diveDown, (double)(Mathf.Clamp01((diveTime - num11) / 0.24f) * length2));
			PlayableExtensions.SetTime<AnimationClipPlayable>(dive, (double)(Mathf.Max(0f, diveTime - num12) % Mathf.Max(0.01f, ((AnimationClipPlayable)(ref dive)).GetAnimationClip().length)));
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(diveMixer, 0, 1f - num13);
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(diveMixer, 1, num13 * (1f - num14));
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(diveMixer, 2, num14);
			PlayableExtensions.SetTime<AnimationClipPlayable>(shot, (double)(Mathf.Clamp01(shotTime / shotDuration) * ((AnimationClipPlayable)(ref shot)).GetAnimationClip().length));
			PlayableExtensions.SetTime<AnimationClipPlayable>(reload, (double)(Mathf.Clamp01(reloadTime / reloadDuration) * ((AnimationClipPlayable)(ref reload)).GetAnimationClip().length));
			PlayableExtensions.SetTime<AnimationClipPlayable>(dash, (double)(clock % ((AnimationClipPlayable)(ref dash)).GetAnimationClip().length));
			if (sliding && !slideWasActive)
			{
				slideTime = 0f;
				slideExiting = false;
			}
			float length3 = ((AnimationClipPlayable)(ref slideStart)).GetAnimationClip().length;
			float num15 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((slideTime - (length3 - 0.18f)) / 0.18f));
			if (!sliding && slideWasActive)
			{
				slideExitTime = 0f;
				slideExitLoop = num15;
				slideExiting = true;
			}
			if (sliding)
			{
				slideTime += delta;
				num15 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((slideTime - (length3 - 0.18f)) / 0.18f));
				slideWeight = Mathf.MoveTowards(slideWeight, 1f, delta / 0.16f);
				PlayableExtensions.SetTime<AnimationClipPlayable>(slideStart, (double)Mathf.Min(slideTime, length3));
				PlayableExtensions.SetTime<AnimationClipPlayable>(slideLoop, (double)(Mathf.Max(0f, slideTime - (length3 - 0.18f)) % Mathf.Max(0.01f, ((AnimationClipPlayable)(ref slideLoop)).GetAnimationClip().length)));
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(slideMixer, 0, 1f - num15);
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(slideMixer, 1, num15);
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(slideMixer, 2, 0f);
			}
			else if (slideExiting)
			{
				slideExitTime += delta;
				float length4 = ((AnimationClipPlayable)(ref slideGetup)).GetAnimationClip().length;
				float num16 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01(slideExitTime / 0.14f));
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(slideMixer, 0, (1f - slideExitLoop) * (1f - num16));
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(slideMixer, 1, slideExitLoop * (1f - num16));
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(slideMixer, 2, num16);
				PlayableExtensions.SetTime<AnimationClipPlayable>(slideGetup, (double)Mathf.Min(slideExitTime, length4));
				float num17 = 1f - Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((slideExitTime - (length4 - 0.18f)) / 0.18f));
				slideWeight = ((airborne || dashing || diving) ? Mathf.MoveTowards(slideWeight, 0f, delta * 8f) : Mathf.Min(slideWeight, num17));
				if (slideExitTime >= length4 || slideWeight <= 0f)
				{
					slideExiting = false;
				}
			}
			else
			{
				slideWeight = 0f;
			}
			slideWasActive = sliding;
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(slideLayer, 1, slideWeight);
			PlayableExtensions.SetTime<AnimationClipPlayable>(slideReload, (double)(Mathf.Clamp01(reloadTime / reloadDuration) * ((AnimationClipPlayable)(ref slideReload)).GetAnimationClip().length));
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(reloadMixer, 0, 1f - slideWeight);
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(reloadMixer, 1, slideWeight);
			salvoTime += delta;
			salvoWeight = Mathf.MoveTowards(salvoWeight, (float)((salvoTime < ((AnimationClipPlayable)(ref salvo)).GetAnimationClip().length - 0.1f) ? 1 : 0), delta * 8f);
			PlayableExtensions.SetTime<AnimationClipPlayable>(salvo, (double)Mathf.Min(salvoTime, ((AnimationClipPlayable)(ref salvo)).GetAnimationClip().length));
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 5, salvoWeight * (1f - diveWeight) * (1f - dashWeight));
			fuelTime += delta;
			if (!fuelActive)
			{
				fuelExitTime += delta;
			}
			float length5 = ((AnimationClipPlayable)(ref fuelIntro)).GetAnimationClip().length;
			float num18 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((fuelTime - (length5 - 0.12f)) / 0.12f));
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(fuelMixer, 0, fuelActive ? (1f - num18) : 0f);
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(fuelMixer, 1, fuelActive ? num18 : 0f);
			PlayableExtensions.SetTime<AnimationClipPlayable>(fuelIntro, (double)Mathf.Min(fuelTime, length5));
			PlayableExtensions.SetTime<AnimationClipPlayable>(fuelLoop, (double)(Mathf.Max(0f, fuelTime - length5) % Mathf.Max(0.01f, ((AnimationClipPlayable)(ref fuelLoop)).GetAnimationClip().length)));
			PlayableExtensions.SetTime<AnimationClipPlayable>(fuelEnd, (double)Mathf.Min(fuelExitTime, ((AnimationClipPlayable)(ref fuelEnd)).GetAnimationClip().length));
			fuelWeight = Mathf.MoveTowards(fuelWeight, (float)(fuelActive ? 1 : 0), delta * 8f);
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 6, fuelWeight * (1f - diveWeight) * (1f - dashWeight));
			fuelRecoveryWeight = Mathf.MoveTowards(fuelRecoveryWeight, (float)((!fuelActive && fuelExitTime < ((AnimationClipPlayable)(ref fuelEnd)).GetAnimationClip().length - 0.2f) ? 1 : 0), delta * 8f);
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 7, fuelRecoveryWeight * (1f - diveWeight) * (1f - dashWeight));
			ultimateTime += delta;
			ultimateWeight = Mathf.MoveTowards(ultimateWeight, (float)((ultimatePhase > 0) ? 1 : 0), delta * 10f);
			for (int j = 0; j < 5; j++)
			{
				float num19 = ((ultimatePhase == j + 1) ? 1 : 0);
				float num20 = Mathf.MoveTowards(PlayableExtensions.GetInputWeight<AnimationMixerPlayable>(ultimateMixer, j), num19, delta * 10f);
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(ultimateMixer, j, num20);
				float length6 = ((AnimationClipPlayable)(ref ultimateClips[j])).GetAnimationClip().length;
				ultimateAges[j] += delta;
				PlayableExtensions.SetTime<AnimationClipPlayable>(ultimateClips[j], (double)((j == 1 || j == 3) ? (ultimateAges[j] % Mathf.Max(0.01f, length6)) : Mathf.Min(ultimateAges[j] * j switch
				{
					2 => length6 / 0.32f, 
					0 => length6 / 0.42f, 
					_ => 1f, 
				}, length6)));
			}
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 8, ultimateWeight);
			tumbleTime += delta;
			tumbleWeight = Mathf.MoveTowards(tumbleWeight, (float)(tumbling ? 1 : 0), delta * 12f);
			float num21 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((tumbleTime - 0.24f) / 0.12f));
			PlayableExtensions.SetTime<AnimationClipPlayable>(tumbleIntro, (double)(Mathf.Clamp01(tumbleTime / 0.36f) * ((AnimationClipPlayable)(ref tumbleIntro)).GetAnimationClip().length));
			PlayableExtensions.SetTime<AnimationClipPlayable>(tumbleLoop, (double)(Mathf.Max(0f, tumbleTime - 0.24f) % Mathf.Max(0.01f, ((AnimationClipPlayable)(ref tumbleLoop)).GetAnimationClip().length)));
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(tumbleMixer, 0, 1f - num21);
			PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(tumbleMixer, 1, num21);
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 9, tumbleWeight * (1f - ultimateWeight));
			if (Object.op_Implicit((Object)(object)rootBone))
			{
				Transform obj = rootBone;
				obj.localPosition -= appliedOffset;
			}
			appliedOffset = Vector3.zero;
			presentationAge += delta;
			previousAge += delta;
			presentationWeight = Mathf.MoveTowards(presentationWeight, (float)(presentationActive ? 1 : 0), delta / 0.18f);
			presentationBlend = Mathf.MoveTowards(presentationBlend, 1f, delta / 0.18f);
			float num22 = Mathf.SmoothStep(0f, 1f, presentationBlend);
			for (int k = 0; k < presentationClips.Length; k++)
			{
				AnimationClipPlayable val2 = presentationClips[k];
				float num23 = ((k == presentationIndex) ? presentationAge : previousAge);
				bool flag = ((k == presentationIndex) ? presentationLoop : previousLoop);
				if (k == presentationIndex || k == presentationPrevious)
				{
					PlayableExtensions.SetTime<AnimationClipPlayable>(val2, (double)(flag ? (num23 % Mathf.Max(0.01f, ((AnimationClipPlayable)(ref val2)).GetAnimationClip().length)) : Mathf.Min(num23, ((AnimationClipPlayable)(ref val2)).GetAnimationClip().length)));
				}
				PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(presentationMixer, k, (k == presentationIndex) ? num22 : ((k == presentationPrevious) ? (1f - num22) : 0f));
			}
			PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, 10, presentationWeight);
			((PlayableGraph)(ref graph)).Evaluate(0f);
			if (Object.op_Implicit((Object)(object)rootBone) && Presenting)
			{
				appliedOffset = (Object.op_Implicit((Object)(object)rootBone.parent) ? rootBone.parent.InverseTransformVector(presentationOffset * presentationWeight) : (presentationOffset * presentationWeight));
				Transform obj2 = rootBone;
				obj2.localPosition += appliedOffset;
			}
			if (!Presenting)
			{
				if (diving && Object.op_Implicit((Object)(object)rootBone) && Object.op_Implicit((Object)(object)head) && Object.op_Implicit((Object)(object)pelvis) && ((Vector3)(ref diveDirection)).sqrMagnitude > 0.1f)
				{
					Transform obj3 = rootBone;
					Quaternion identity = Quaternion.identity;
					Vector3 val3 = head.position - pelvis.position;
					obj3.rotation = Quaternion.Slerp(identity, Quaternion.FromToRotation(((Vector3)(ref val3)).normalized, ((Vector3)(ref diveDirection)).normalized), diveWeight) * rootBone.rotation;
				}
				if (Object.op_Implicit((Object)(object)chest) && fuelWeight > 0.01f && ultimateWeight < 0.01f)
				{
					chest.rotation = Quaternion.AngleAxis((Mathf.Sin(clock * 35f) * 0.55f + Mathf.Sin(clock * 19f) * 0.3f) * fuelWeight, ((Component)this).transform.right) * chest.rotation;
				}
				smoothedSlideLean = Mathf.Lerp(smoothedSlideLean, sliding ? Mathf.Clamp(slideLean, -10f, 10f) : 0f, 1f - Mathf.Exp(-8f * delta));
				if (Object.op_Implicit((Object)(object)chest) && slideWeight > 0.001f)
				{
					chest.rotation = Quaternion.AngleAxis((0f - smoothedSlideLean) * slideWeight, ((Component)this).transform.forward) * chest.rotation;
				}
				if ((Object)(object)chest != (Object)null && tumbleWeight < 0.01f && ultimateWeight < 0.01f && diveWeight < 0.01f && Mathf.Abs(aimPitch) > 0.01f)
				{
					chest.rotation = Quaternion.AngleAxis(Mathf.Clamp(aimPitch, -55f, 55f) * 0.55f, ((Component)this).transform.right) * chest.rotation;
				}
				if (tumbleWeight < 0.01f && shotWeight > 0.001f && reloadWeight < 0.01f && dashWeight < 0.01f && diveWeight < 0.01f && fuelWeight < 0.01f && fuelRecoveryWeight < 0.01f && salvoWeight < 0.01f)
				{
					grip.ApplyGrip();
				}
			}
		}

		private void LateUpdate()
		{
			Evaluate(Time.deltaTime);
		}

		private void OnDestroy()
		{
			if (((PlayableGraph)(ref graph)).IsValid())
			{
				((PlayableGraph)(ref graph)).Destroy();
			}
		}
	}
	public static class DannySlideRules
	{
		public static bool CanEnter(Vector3 velocity, Vector3 movement, bool sprint, float minimum)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//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_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			velocity = Vector3.ProjectOnPlane(velocity, Vector3.up);
			movement = Vector3.ProjectOnPlane(movement, Vector3.up);
			if (sprint && ((Vector3)(ref velocity)).magnitude >= minimum && ((Vector3)(ref movement)).sqrMagnitude > 0.01f)
			{
				return Vector3.Dot(((Vector3)(ref velocity)).normalized, ((Vector3)(ref movement)).normalized) >= 0.35f;
			}
			return false;
		}

		public static float EntrySpeed(float incoming, float multiplier, float bonus)
		{
			return incoming * multiplier + bonus;
		}
	}
	[DefaultExecutionOrder(200)]
	public sealed class DannyThrusterVisual : MonoBehaviour
	{
		private Transform[] jets = Array.Empty<Transform>();

		private Material jetMaterial;

		private Mesh jetMesh;

		public bool Powered;

		public bool Diving;

		public float Intensity = 1f;

		private float intensity;

		public Vector3 DiveDirection = Vector3.down;

		public int NozzleCount => jets.Length;

		public int Initialize(Material template)
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: 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_00c6: 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_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: 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_0132: 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_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//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_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_020e: 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_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: 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_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Expected O, but got Unknown
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			Transform[] array = (from t in ((Component)this).GetComponentsInChildren<Transform>()
				where ((Object)t).name == "jetpack_nozzles_L" || ((Object)t).name == "jetpack_nozzles_R"
				select t).ToArray();
			if (!Object.op_Implicit((Object)(object)template))
			{
				throw new InvalidOperationException("Dedicated DannyJetFlame material is missing");
			}
			jetMaterial = new Material(template);
			Transform[] array2 = (Transform[])(object)new Transform[array.Length];
			jetMesh = new Mesh();
			((Object)jetMesh).name = "Danny crossed thruster ribbons";
			jetMesh.vertices = (Vector3[])(object)new Vector3[8]
			{
				new Vector3(-0.5f, 0f, 0f),
				new Vector3(0.5f, 0f, 0f),
				new Vector3(-0.2f, 0f, 1f),
				new Vector3(0.2f, 0f, 1f),
				new Vector3(0f, -0.5f, 0f),
				new Vector3(0f, 0.5f, 0f),
				new Vector3(0f, -0.2f, 1f),
				new Vector3(0f, 0.2f, 1f)
			};
			jetMesh.uv = (Vector2[])(object)new Vector2[8]
			{
				new Vector2(0f, 0f),
				new Vector2(1f, 0f),
				new Vector2(0f, 1f),
				new Vector2(1f, 1f),
				new Vector2(0f, 0f),
				new Vector2(1f, 0f),
				new Vector2(0f, 1f),
				new Vector2(1f, 1f)
			};
			Color val = default(Color);
			((Color)(ref val))..ctor(1f, 0.8f, 0.3f, 0.95f);
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(1f, 0.3f, 0.03f, 0f);
			jetMesh.colors = (Color[])(object)new Color[8] { val, val, val2, val2, val, val, val2, val2 };
			jetMesh.triangles = new int[12]
			{
				0, 2, 1, 1, 2, 3, 4, 6, 5, 5,
				6, 7
			};
			jetMesh.RecalculateBounds();
			for (int num = 0; num < array.Length; num++)
			{
				GameObject val3 = new GameObject("DannyJetFlame");
				val3.transform.SetParent(array[num], false);
				val3.transform.localScale = Vector3.one;
				array2[num] = val3.transform;
				GameObject val4 = new GameObject("ThrusterCore");
				val4.transform.SetParent(val3.transform, false);
				val4.AddComponent<MeshFilter>().sharedMesh = jetMesh;
				((Renderer)val4.AddComponent<MeshRenderer>()).sharedMaterial = jetMaterial;
				val4.SetActive(false);
			}
			jets = array2;
			return array2.Length;
		}

		private void LateUpdate()
		{
			//IL_0091: 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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: 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_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			intensity = Mathf.Lerp(intensity, Powered ? Mathf.Clamp(Intensity, 0.5f, 3f) : 0f, 1f - Mathf.Exp(-18f * Time.deltaTime));
			Transform[] array = jets;
			foreach (Transform val in array)
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					bool active = intensity > 0.05f;
					val.rotation = Quaternion.LookRotation((Diving && ((Vector3)(ref DiveDirection)).sqrMagnitude > 0.01f) ? (-DiveDirection) : Vector3.down);
					Transform val2 = ((Component)val).transform.Find("ThrusterCore");
					if (Object.op_Implicit((Object)(object)val2))
					{
						((Component)val2).gameObject.SetActive(active);
						Vector3 lossyScale = ((Component)val).transform.lossyScale;
						val2.localScale = new Vector3(0.24f * Mathf.Sqrt(intensity) / Mathf.Max(0.0001f, Mathf.Abs(lossyScale.x)), 0.24f * Mathf.Sqrt(intensity) / Mathf.Max(0.0001f, Mathf.Abs(lossyScale.y)), (0.9f + Mathf.Sin(Time.time * (40f + intensity * 15f)) * 0.09f) * intensity / Mathf.Max(0.0001f, Mathf.Abs(lossyScale.z)));
					}
				}
			}
		}

		private void OnDestroy()
		{
			if (Object.op_Implicit((Object)(object)jetMaterial))
			{
				Object.Destroy((Object)(object)jetMaterial);
			}
			if (Object.op_Implicit((Object)(object)jetMesh))
			{
				Object.Destroy((Object)(object)jetMesh);
			}
		}
	}
}
namespace HenryMod
{
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.camer.DeadmanDanny", "DeadmanDanny", "0.2.7")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class HenryPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.camer.DeadmanDanny";

		public const string MODNAME = "DeadmanDanny";

		public const string MODVERSION = "0.2.7";

		public const string DEVELOPER_PREFIX = "CAMER";

		public static HenryPlugin instance;

		private void Awake()
		{
			instance = this;
			Log.Init(((BaseUnityPlugin)this).Logger);
			DannyTuning.Initialize(((BaseUnityPlugin)this).Config);
			Language.Init();
			new DannySurvivor().Initialize();
			new ContentPacks().Initialize();
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(DannySmokeTest.StartIfRequested));
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(DannySalvoSmokeTest.StartIfRequested));
		}
	}
	internal static class Log
	{
		internal static ManualLogSource _logSource;

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

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

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

		internal static void ErrorAssetBundle(string assetName, string bundleName)
		{
			Error("failed to load asset, " + assetName + ", because it does not exist in asset bundle, " + bundleName);
		}

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

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

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

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
}
namespace HenryMod.Modules
{
	internal static class Asset
	{
		internal static Dictionary<string, AssetBundle> loadedBundles = new Dictionary<string, AssetBundle>();

		internal static AssetBundle LoadAssetBundle(string bundleName)
		{
			if (bundleName == "myassetbundle")
			{
				Log.Error("AssetBundle name hasn't been changed. not loading any assets to avoid conflicts.\nMake sure to rename your assetbundle filename and rename the AssetBundleName field in your character setup code ");
				return null;
			}
			if (loadedBundles.ContainsKey(bundleName))
			{
				return loadedBundles[bundleName];
			}
			AssetBundle val = null;
			try
			{
				val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)HenryPlugin.instance).Info.Location), "AssetBundles", bundleName));
			}
			catch (Exception arg)
			{
				Log.Error($"Error loading asset bundle, {bundleName}. Your asset bundle must be in a folder next to your mod dll called 'AssetBundles'. Follow the guide to build and install your mod correctly!\n{arg}");
			}
			loadedBundles[bundleName] = val;
			return val;
		}

		internal static GameObject CloneTracer(string originalTracerName, string newTracerName)
		{
			if ((Object)(object)LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName) == (Object)null)
			{
				return null;
			}
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName), newTracerName, true);
			if (!Object.op_Implicit((Object)(object)val.GetComponent<EffectComponent>()))
			{
				val.AddComponent<EffectComponent>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<VFXAttributes>()))
			{
				val.AddComponent<VFXAttributes>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<NetworkIdentity>()))
			{
				val.AddComponent<NetworkIdentity>();
			}
			val.GetComponent<Tracer>().speed = 250f;
			val.GetComponent<Tracer>().length = 50f;
			Content.CreateAndAddEffectDef(val);
			return val;
		}

		internal static void ConvertAllRenderersToHopooShader(GameObject objectToConvert)
		{
			if (!Object.op_Implicit((Object)(object)objectToConvert))
			{
				return;
			}
			MeshRenderer[] componentsInChildren = objectToConvert.GetComponentsInChildren<MeshRenderer>();
			foreach (MeshRenderer val in componentsInChildren)
			{
				if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
				{
					((Renderer)val).sharedMaterial.ConvertDefaultShaderToHopoo();
				}
			}
			SkinnedMeshRenderer[] componentsInChildren2 = objectToConvert.GetComponentsInChildren<SkinnedMeshRenderer>();
			foreach (SkinnedMeshRenderer val2 in componentsInChildren2)
			{
				if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Renderer)val2).sharedMaterial))
				{
					((Renderer)val2).sharedMaterial.ConvertDefaultShaderToHopoo();
				}
			}
		}

		internal static GameObject LoadCrosshair(string crosshairName)
		{
			GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair");
			if ((Object)(object)val == (Object)null)
			{
				Log.Error("could not load crosshair with the name " + crosshairName + ". defaulting to Standard");
				return LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/StandardCrosshair");
			}
			return val;
		}

		internal static GameObject LoadEffect(this AssetBundle assetBundle, string resourceName, bool parentToTransform)
		{
			return assetBundle.LoadEffect(resourceName, "", parentToTransform);
		}

		internal static GameObject LoadEffect(this AssetBundle assetBundle, string resourceName, string soundName = "", bool parentToTransform = false)
		{
			//IL_003c: 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 = assetBundle.LoadAsset<GameObject>(resourceName);
			if (!Object.op_Implicit((Object)(object)val))
			{
				Log.ErrorAssetBundle(resourceName, ((Object)assetBundle).name);
				return null;
			}
			val.AddComponent<DestroyOnTimer>().duration = 12f;
			val.AddComponent<NetworkIdentity>();
			val.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			EffectComponent obj = val.AddComponent<EffectComponent>();
			obj.applyScale = false;
			obj.effectIndex = (EffectIndex)(-1);
			obj.parentToReferencedTransform = parentToTransform;
			obj.positionAtReferencedTransform = true;
			obj.soundName = soundName;
			Content.CreateAndAddEffectDef(val);
			return val;
		}

		internal static GameObject CreateProjectileGhostPrefab(this AssetBundle assetBundle, string ghostName)
		{
			GameObject val = assetBundle.LoadAsset<GameObject>(ghostName);
			if ((Object)(object)val == (Object)null)
			{
				Log.Error("Failed to load ghost prefab " + ghostName);
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<NetworkIdentity>()))
			{
				val.AddComponent<NetworkIdentity>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<ProjectileGhostController>()))
			{
				val.AddComponent<ProjectileGhostController>();
			}
			ConvertAllRenderersToHopooShader(val);
			return val;
		}

		internal static GameObject CloneProjectilePrefab(string prefabName, string newPrefabName)
		{
			return PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/" + prefabName), newPrefabName);
		}

		internal static GameObject LoadAndAddProjectilePrefab(this AssetBundle assetBundle, string newPrefabName)
		{
			GameObject val = assetBundle.LoadAsset<GameObject>(newPrefabName);
			if ((Object)(object)val == (Object)null)
			{
				Log.ErrorAssetBundle(newPrefabName, ((Object)assetBundle).name);
				return null;
			}
			Content.AddProjectilePrefab(val);
			return val;
		}
	}
	public static class Config
	{
		public static ConfigFile MyConfig = ((BaseUnityPlugin)HenryPlugin.instance).Config;

		public static ConfigEntry<bool> CharacterEnableConfig(string section, string characterName, string description = "", bool enabledByDefault = true)
		{
			if (string.IsNullOrEmpty(description))
			{
				description = "Set to false to disable this character and as much of its code and content as possible";
			}
			return BindAndOptions(section, "Enable " + characterName, enabledByDefault, description, restartRequired: true);
		}

		public static ConfigEntry<T> BindAndOptions<T>(string section, string name, T defaultValue, string description = "", bool restartRequired = false)
		{
			return BindAndOptions(section, name, defaultValue, 0f, 20f, description, restartRequired);
		}

		public static ConfigEntry<T> BindAndOptions<T>(string section, string name, T defaultValue, float min, float max, string description = "", bool restartRequired = false)
		{
			if (string.IsNullOrEmpty(description))
			{
				description = name;
			}
			if (restartRequired)
			{
				description += " (restart required)";
			}
			ConfigEntry<T> result = MyConfig.Bind<T>(section, name, defaultValue, description);
			Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
			return result;
		}

		public static ConfigEntry<float> BindAndOptionsSlider(string section, string name, float defaultValue, string description, float min = 0f, float max = 20f, bool restartRequired = false)
		{
			return BindAndOptions(section, name, defaultValue, min, max, description, restartRequired);
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private static void TryRegisterOption<T>(ConfigEntry<T> entry, float min, float max, bool restartRequired)
		{
		}

		public static bool GetKeyPressed(KeyboardShortcut entry)
		{
			//IL_0010: 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)
			foreach (KeyCode modifier in ((KeyboardShortcut)(ref entry)).Modifiers)
			{
				if (!Input.GetKey(modifier))
				{
					return false;
				}
			}
			return Input.GetKeyDown(((KeyboardShortcut)(ref entry)).MainKey);
		}
	}
	internal class Content
	{
		internal static void AddCharacterBodyPrefab(GameObject bprefab)
		{
			ContentPacks.bodyPrefabs.Add(bprefab);
		}

		internal static void AddMasterPrefab(GameObject prefab)
		{
			ContentPacks.masterPrefabs.Add(prefab);
		}

		internal static void AddProjectilePrefab(GameObject prefab)
		{
			ContentPacks.projectilePrefabs.Add(prefab);
		}

		internal static void AddSurvivorDef(SurvivorDef survivorDef)
		{
			ContentPacks.survivorDefs.Add(survivorDef);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CreateSurvivor(bodyPrefab, displayPrefab, charColor, tokenPrefix, null, 100f);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix, float sortPosition)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CreateSurvivor(bodyPrefab, displayPrefab, charColor, tokenPrefix, null, sortPosition);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix, UnlockableDef unlockableDef)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CreateSurvivor(bodyPrefab, displayPrefab, charColor, tokenPrefix, unlockableDef, 100f);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix, UnlockableDef unlockableDef, float sortPosition)
		{
			//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)
			SurvivorDef obj = ScriptableObject.CreateInstance<SurvivorDef>();
			obj.bodyPrefab = bodyPrefab;
			obj.displayPrefab = displayPrefab;
			obj.primaryColor = charColor;
			obj.cachedName = ((Object)bodyPrefab).name.Replace("Body", "");
			obj.displayNameToken = tokenPrefix + "NAME";
			obj.descriptionToken = tokenPrefix + "DESCRIPTION";
			obj.outroFlavorToken = tokenPrefix + "OUTRO_FLAVOR";
			obj.mainEndingEscapeFailureFlavorToken = tokenPrefix + "OUTRO_FAILURE";
			obj.desiredSortPosition = sortPosition;
			obj.unlockableDef = unlockableDef;
			AddSurvivorDef(obj);
		}

		internal static void AddUnlockableDef(UnlockableDef unlockableDef)
		{
			ContentPacks.unlockableDefs.Add(unlockableDef);
		}

		internal static UnlockableDef CreateAndAddUnlockbleDef(string identifier, string nameToken, Sprite achievementIcon)
		{
			UnlockableDef obj = ScriptableObject.CreateInstance<UnlockableDef>();
			obj.cachedName = identifier;
			obj.nameToken = nameToken;
			obj.achievementIcon = achievementIcon;
			AddUnlockableDef(obj);
			return obj;
		}

		internal static void AddSkillDef(SkillDef skillDef)
		{
			ContentPacks.skillDefs.Add(skillDef);
		}

		internal static void AddSkillFamily(SkillFamily skillFamily)
		{
			ContentPacks.skillFamilies.Add(skillFamily);
		}

		internal static void AddEntityState(Type entityState)
		{
			ContentPacks.entityStates.Add(entityState);
		}

		internal static void AddBuffDef(BuffDef buffDef)
		{
			ContentPacks.buffDefs.Add(buffDef);
		}

		internal static BuffDef CreateAndAddBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff)
		{
			//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)
			BuffDef obj = ScriptableObject.CreateInstance<BuffDef>();
			((Object)obj).name = buffName;
			obj.buffColor = buffColor;
			obj.canStack = canStack;
			obj.isDebuff = isDebuff;
			obj.eliteDef = null;
			obj.iconSprite = buffIcon;
			AddBuffDef(obj);
			return obj;
		}

		internal static void AddEffectDef(EffectDef effectDef)
		{
			ContentPacks.effectDefs.Add(effectDef);
		}

		internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_000d: Expected O, but got Unknown
			EffectDef val = new EffectDef(effectPrefab);
			AddEffectDef(val);
			return val;
		}

		internal static void AddNetworkSoundEventDef(NetworkSoundEventDef networkSoundEventDef)
		{
			ContentPacks.networkSoundEventDefs.Add(networkSoundEventDef);
		}

		internal static NetworkSoundEventDef CreateAndAddNetworkSoundEventDef(string eventName)
		{
			NetworkSoundEventDef obj = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
			obj.akId = AkSoundEngine.GetIDFromString(eventName);
			obj.eventName = eventName;
			AddNetworkSoundEventDef(obj);
			return obj;
		}
	}
	internal class ContentPacks : IContentPackProvider
	{
		internal ContentPack contentPack = new ContentPack();

		public static List<GameObject> bodyPrefabs = new List<GameObject>();

		public static List<GameObject> masterPrefabs = new List<GameObject>();

		public static List<GameObject> projectilePrefabs = new List<GameObject>();

		public static List<SurvivorDef> survivorDefs = new List<SurvivorDef>();

		public static List<UnlockableDef> unlockableDefs = new List<UnlockableDef>();

		public static List<SkillFamily> skillFamilies = new List<SkillFamily>();

		public static List<SkillDef> skillDefs = new List<SkillDef>();

		public static List<Type> entityStates = new List<Type>();

		public static List<BuffDef> buffDefs = new List<BuffDef>();

		public static List<EffectDef> effectDefs = new List<EffectDef>();

		public static List<NetworkSoundEventDef> networkSoundEventDefs = new List<NetworkSoundEventDef>();

		public string identifier => "com.camer.DeadmanDanny";

		public void Initialize()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
		}

		private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
		{
			addContentPackProvider.Invoke((IContentPackProvider)(object)this);
		}

		public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
		{
			contentPack.identifier = identifier;
			contentPack.bodyPrefabs.Add(bodyPrefabs.ToArray());
			contentPack.masterPrefabs.Add(masterPrefabs.ToArray());
			contentPack.projectilePrefabs.Add(projectilePrefabs.ToArray());
			contentPack.survivorDefs.Add(survivorDefs.ToArray());
			contentPack.unlockableDefs.Add(unlockableDefs.ToArray());
			contentPack.skillDefs.Add(skillDefs.ToArray());
			contentPack.skillFamilies.Add(skillFamilies.ToArray());
			contentPack.entityStateTypes.Add(entityStates.ToArray());
			contentPack.buffDefs.Add(buffDefs.ToArray());
			contentPack.effectDefs.Add(effectDefs.ToArray());
			contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray());
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
		{
			ContentPack.Copy(contentPack, args.output);
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
		{
			args.ReportProgress(1f);
			yield break;
		}
	}
	internal static class ItemDisplayCheck
	{
		public static List<Object> allDisplayedItems;

		public static void PrintUnused(ItemDisplayRuleSet itemDisplayRuleSet, string bodyName = "")
		{
			PrintUnused((IEnumerable<KeyAssetRuleGroup>)itemDisplayRuleSet.keyAssetRuleGroups.ToList(), bodyName);
		}

		public static void PrintUnused(IEnumerable<KeyAssetRuleGroup> ruleSet = null, string bodyName = "")
		{
			//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_003d: 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_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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)
			string text = "generating item displays for " + bodyName;
			if (allDisplayedItems == null)
			{
				LazyGatherAllItems();
			}
			List<Object> list = new List<Object>(allDisplayedItems);
			string text2 = "";
			if (ruleSet != null)
			{
				foreach (KeyAssetRuleGroup item in ruleSet)
				{
					if (item.displayRuleGroup.rules.Length != 0)
					{
						list.Remove(item.keyAsset);
						if (string.IsNullOrEmpty(text2))
						{
							text2 = item.displayRuleGroup.rules[0].childName;
						}
					}
				}
			}
			if (string.IsNullOrEmpty(text2))
			{
				text2 = "Chest";
			}
			foreach (Object item2 in list)
			{
				string text3 = "";
				if (ItemDisplays.KeyAssetDisplayPrefabs.ContainsKey(item2))
				{
					text3 += SpitOutNewRule(item2, text2, ItemDisplays.KeyAssetDisplayPrefabs[item2]);
				}
				else
				{
					Log.Error($"COULD NOT FIND DISPLAY PREFABS FOR KEYASSET {item2}");
				}
				text += text3;
			}
			Log.Message(text);
		}

		private static void LazyGatherAllItems()
		{
			allDisplayedItems = new List<Object>(ItemDisplays.KeyAssetDisplayPrefabs.Keys);
			allDisplayedItems.Sort(delegate(Object item1, Object item2)
			{
				if (item1 is ItemDef && item2 is ItemDef)
				{
					return item1.name.CompareTo(item2.name);
				}
				if (item1 is EquipmentDef && item2 is EquipmentDef)
				{
					return item1.name.CompareTo(item2.name);
				}
				if (item1 is ItemDef && item2 is EquipmentDef)
				{
					return -1;
				}
				return (item1 is EquipmentDef && item2 is ItemDef) ? 1 : 0;
			});
		}

		private static string SpitOutNewRule(Object asset, string firstCompatibleChild, ItemDisplayRule[] displayRules)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result