Decompiled source of Potmobile v1.4.9

plugins/Moffein-Potmobile/Potmobile.dll

Decompiled a month 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 AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.MoffeinPotmobile;
using EntityStates.MoffeinPotmobile.Boost;
using EntityStates.MoffeinPotmobile.Weapon;
using HG;
using Microsoft.CodeAnalysis;
using On.EntityStates;
using On.RoR2;
using Potmobile;
using Potmobile.Components;
using Potmobile.Cores;
using Potmobile.Survivors.Hauler;
using Potmobile.Survivors.Potmobile;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using TILER2;
using ThinkInvisible.ClassicItems;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("Potmobile")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyProduct("Potmobile")]
[assembly: AssemblyTitle("Potmobile")]
[assembly: AssemblyInformationalVersion("1.0.0+ddbeedef2b88ffbc11c14ff9f1a1eba576fd6723")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[Microsoft.CodeAnalysis.Embedded]
	[CompilerGenerated]
	[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;
		}
	}
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	[CompilerGenerated]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace EntityStates.MoffeinPotmobile
{
	public class PotmobileDeath : GenericCharacterDeath
	{
		public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniExplosionVFXQuick.prefab").WaitForCompletion();

		public override void OnEnter()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			((GenericCharacterDeath)this).OnEnter();
			Util.PlaySound("Play_golem_death", ((EntityState)this).gameObject);
			EffectManager.SpawnEffect(effectPrefab, new EffectData
			{
				scale = 8f,
				origin = ((EntityState)this).transform.position
			}, false);
			if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform) && Object.op_Implicit((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject))
			{
				DestroyOnTimer val = ((Component)((EntityState)this).modelLocator.modelTransform).gameObject.AddComponent<DestroyOnTimer>();
				val.duration = 0.1f;
				((Behaviour)val).enabled = true;
			}
		}
	}
}
namespace EntityStates.MoffeinPotmobile.Weapon
{
	public class FirePotCannon : BaseState
	{
		protected float _damageCoefficientInternal;

		public static bool enableICBMSynergy = true;

		public static GameObject projectilePrefab;

		public static GameObject projectilePrefabEnemy;

		public static float damageCoefficient = 10f;

		public static float force = 2500f;

		public static float baseDuration = 1.5f;

		private float duration;

		public override void OnEnter()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: 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_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: 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_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			Ray aimRay = ((BaseState)this).GetAimRay();
			Util.PlaySound("Play_MULT_m1_grenade_launcher_shoot", ((EntityState)this).gameObject);
			ModifyStats();
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			int num = 0;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory))
			{
				num = ((EntityState)this).characterBody.inventory.GetItemCount(Items.MoreMissile);
			}
			GameObject val = GetProjectilePrefab();
			if (enableICBMSynergy && num > 0)
			{
				float num2 = 1f;
				int num3 = num - 1;
				if (num3 > 0)
				{
					num2 += (float)num3 * 0.5f;
				}
				bool flag = ((BaseState)this).RollCrit();
				Vector3 val2 = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction);
				Vector3 val3 = Vector3.Cross(((Ray)(ref aimRay)).direction, val2);
				float num4 = 0f;
				float num5 = 0f;
				float num6 = 0f;
				num6 = Random.Range(1f + num4, 1f + num4) * 3f;
				num5 = num6 / 2f;
				Vector3 val4 = Quaternion.AngleAxis((0f - num6) * 0.5f, val3) * ((Ray)(ref aimRay)).direction;
				Quaternion val5 = Quaternion.AngleAxis(num5, val3);
				Ray val6 = default(Ray);
				((Ray)(ref val6))..ctor(((Ray)(ref aimRay)).origin, val4);
				for (int i = 0; i < 3; i++)
				{
					ProjectileManager.instance.FireProjectile(val, ((Ray)(ref val6)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val6)).direction), ((EntityState)this).gameObject, num2 * base.damageStat * _damageCoefficientInternal, (i != 1) ? 0f : force, flag, (DamageColorIndex)0, (GameObject)null, -1f);
					((Ray)(ref val6)).direction = val5 * ((Ray)(ref val6)).direction;
				}
			}
			else
			{
				ProjectileManager.instance.FireProjectile(val, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * _damageCoefficientInternal, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public virtual void ModifyStats()
		{
			_damageCoefficientInternal = damageCoefficient;
		}

		public virtual GameObject GetProjectilePrefab()
		{
			return EnemySetup.ShouldApplyEnemyDebuff(((EntityState)this).characterBody) ? projectilePrefabEnemy : projectilePrefab;
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
	public class FirePotCannonScepter : FirePotCannon
	{
		public static GameObject scepterProjectilePrefab;

		public static GameObject scepterProjectilePrefabEnemy;

		public static float scepterDamageMultiplier = 2f;

		public override void ModifyStats()
		{
			_damageCoefficientInternal = FirePotCannon.damageCoefficient * scepterDamageMultiplier;
		}

		public override GameObject GetProjectilePrefab()
		{
			return EnemySetup.ShouldApplyEnemyDebuff(((EntityState)this).characterBody) ? scepterProjectilePrefabEnemy : scepterProjectilePrefab;
		}
	}
	public class PushAll : BaseState
	{
		public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerMineExplosion.prefab").WaitForCompletion();

		public static float force = 4500f;

		public static float baseDuration = 2f;

		public static float jumpVelocity = 32f;

		public static float radius = 12f;

		private float duration;

		private bool buttonReleased;

		public override void OnEnter()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			//IL_005d: 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_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: 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_00ff: 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_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Expected O, but got Unknown
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			buttonReleased = false;
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			EffectManager.SpawnEffect(effectPrefab, new EffectData
			{
				origin = ((EntityState)this).transform.position,
				scale = radius
			}, true);
			BlastAttack val = new BlastAttack
			{
				damageType = (DamageType)2115,
				baseDamage = 0f,
				radius = radius,
				procCoefficient = 0f,
				procChainMask = default(ProcChainMask),
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				canRejectForce = false,
				attackerFiltering = (AttackerFiltering)2,
				baseForce = force,
				bonusForce = Mathf.Min(1000f, force) * Vector3.up,
				falloffModel = (FalloffModel)0,
				crit = false,
				losType = (LoSType)0,
				position = ((EntityState)this).transform.position
			};
			DamageAPI.AddModdedDamageType(val, PotmobileContent.ModdedDamageTypes.BonusForceToPotmobile);
			val.Fire();
			if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody))
			{
				Vector3 velocity = ((EntityState)this).rigidbody.velocity;
				if (velocity.y < 0f)
				{
					velocity.y = 0f;
				}
				velocity.y += jumpVelocity;
				((EntityState)this).rigidbody.velocity = velocity;
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill2.down)
				{
					buttonReleased = true;
				}
				if (((EntityState)this).fixedAge >= duration)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0011: 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_0014: Unknown result type (might be due to invalid IL or missing references)
			if (buttonReleased)
			{
				return (InterruptPriority)0;
			}
			return (InterruptPriority)2;
		}
	}
}
namespace EntityStates.MoffeinPotmobile.Boost
{
	public class Boost : BaseState
	{
		private SpeedController speedController;

		public static float baseDuration = 2.5f;

		public static float forceMultiplier = 2f;

		public static GameObject trailPrefab = Resources.Load<GameObject>("prefabs/effects/impacteffects/missileexplosionvfx");

		public static float trailFrequency = 20f;

		private float trailStopwatch;

		private float trailTime;

		private float maxSpeedDuringState;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			Util.PlaySound("Play_MULT_shift_start", ((EntityState)this).gameObject);
			trailStopwatch = 0f;
			maxSpeedDuringState = 10f;
			trailTime = 1f / trailFrequency;
			speedController = ((EntityState)this).GetComponent<SpeedController>();
			if (Object.op_Implicit((Object)(object)speedController))
			{
				speedController.speedMult *= forceMultiplier;
			}
		}

		public override void FixedUpdate()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Expected O, but got Unknown
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//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_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			trailStopwatch += Time.fixedDeltaTime;
			if (trailStopwatch >= trailTime)
			{
				EffectManager.SpawnEffect(trailPrefab, new EffectData
				{
					origin = ((EntityState)this).transform.position - ((EntityState)this).transform.forward
				}, false);
				trailStopwatch -= trailTime;
			}
			if (((EntityState)this).isAuthority)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody))
				{
					Vector3 val = default(Vector3);
					((Vector3)(ref val))..ctor(((EntityState)this).rigidbody.velocity.x, 0f, ((EntityState)this).rigidbody.velocity.z);
					float magnitude = ((Vector3)(ref val)).magnitude;
					maxSpeedDuringState = Mathf.Max(maxSpeedDuringState, magnitude);
					Ray aimRay = ((BaseState)this).GetAimRay();
					Vector3 direction = ((Ray)(ref aimRay)).direction;
					direction.y = 0f;
					((Vector3)(ref direction)).Normalize();
					Vector3 val2 = maxSpeedDuringState * direction;
					Vector3 velocity = Vector3.RotateTowards(val, val2, MathF.PI * Time.fixedDeltaTime, float.PositiveInfinity);
					velocity.y = ((EntityState)this).rigidbody.velocity.y;
					((EntityState)this).rigidbody.velocity = velocity;
				}
				if (((EntityState)this).fixedAge >= baseDuration)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)speedController))
			{
				speedController.speedMult /= forceMultiplier;
			}
			Util.PlaySound("Play_MULT_shift_end", ((EntityState)this).gameObject);
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
	public class Reset : BaseState
	{
		public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressBlinkEffect.prefab").WaitForCompletion();

		public static ConfigEntry<bool> resetVelocity;

		public static float baseDuration = 2f;

		private bool buttonReleased;

		public override void OnEnter()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: 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)
			((BaseState)this).OnEnter();
			Util.PlaySound("Play_huntress_shift_mini_blink", ((EntityState)this).gameObject);
			buttonReleased = false;
			if (Object.op_Implicit((Object)(object)((EntityState)this).transform))
			{
				EffectManager.SimpleEffect(effectPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation, false);
			}
			if (((EntityState)this).isAuthority)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).transform))
				{
					Ray aimRay = ((BaseState)this).GetAimRay();
					((EntityState)this).transform.forward = ((Ray)(ref aimRay)).direction;
					((EntityState)this).transform.eulerAngles = new Vector3(0f, ((EntityState)this).transform.eulerAngles.y, 0f);
				}
				if (resetVelocity.Value && Object.op_Implicit((Object)(object)((EntityState)this).rigidbody))
				{
					((EntityState)this).rigidbody.velocity = Vector3.zero;
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill4.down)
				{
					buttonReleased = true;
				}
				if (((EntityState)this).fixedAge >= baseDuration)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0011: 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_0014: Unknown result type (might be due to invalid IL or missing references)
			if (buttonReleased)
			{
				return (InterruptPriority)0;
			}
			return (InterruptPriority)2;
		}
	}
}
namespace Potmobile
{
	public class Assets
	{
		public static AssetBundle assetBundle;

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

		public static void Init()
		{
			if (!Object.op_Implicit((Object)(object)assetBundle))
			{
				assetBundle = AssetBundle.LoadFromFile(Files.GetPathToFile("potmobilebundle"));
			}
		}
	}
	public class PotmobileContent : IContentPackProvider
	{
		public static class ModdedDamageTypes
		{
			public static ModdedDamageType BonusForceToPotmobile;

			public static ModdedDamageType SquashOnKill;

			public static ModdedDamageType PotmobileRam;
		}

		public static class SkillDefs
		{
			public static SkillDef FirePotCannon;

			public static SkillDef FirePotCannonScepter;

			public static SkillDef Push;

			public static SkillDef Boost;

			public static SkillDef Reset;
		}

		public static ContentPack content = new ContentPack();

		public static SurvivorDef PotmobileSurvivorDef;

		public static GameObject PotmobileBodyObject;

		public static GameObject PotmobileMasterObject;

		public static BodyIndex PotmobileBodyIndex = (BodyIndex)(-1);

		public static DirectorCardHolder PotmobileCard;

		public static DirectorCardHolder PotmobileLoopCard;

		public static SurvivorDef HaulerSurvivorDef;

		public static GameObject HaulerBodyObject;

		public static GameObject HaulerMasterObject;

		public static BodyIndex HaulerBodyIndex = (BodyIndex)(-1);

		public static DirectorCardHolder HaulerCard;

		public static DirectorCardHolder HaulerLoopCard;

		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<GameObject> projectilePrefabs = new List<GameObject>();

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

		public string identifier => "MoffeinPotmobile.content";

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
		{
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
		{
			ContentPack.Copy(content, args.output);
			yield break;
		}

		public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
		{
			if (Object.op_Implicit((Object)(object)PotmobileBodyObject))
			{
				content.bodyPrefabs.Add((GameObject[])(object)new GameObject[1] { PotmobileBodyObject });
			}
			if (Object.op_Implicit((Object)(object)PotmobileMasterObject))
			{
				content.masterPrefabs.Add((GameObject[])(object)new GameObject[1] { PotmobileMasterObject });
			}
			if (Object.op_Implicit((Object)(object)PotmobileSurvivorDef))
			{
				content.survivorDefs.Add((SurvivorDef[])(object)new SurvivorDef[1] { PotmobileSurvivorDef });
			}
			if (Object.op_Implicit((Object)(object)HaulerBodyObject))
			{
				content.bodyPrefabs.Add((GameObject[])(object)new GameObject[1] { HaulerBodyObject });
			}
			if (Object.op_Implicit((Object)(object)HaulerMasterObject))
			{
				content.masterPrefabs.Add((GameObject[])(object)new GameObject[1] { HaulerMasterObject });
			}
			if (Object.op_Implicit((Object)(object)HaulerSurvivorDef))
			{
				content.survivorDefs.Add((SurvivorDef[])(object)new SurvivorDef[1] { HaulerSurvivorDef });
			}
			content.skillDefs.Add(skillDefs.ToArray());
			content.entityStateTypes.Add(entityStates.ToArray());
			content.skillFamilies.Add(skillFamilies.ToArray());
			content.projectilePrefabs.Add(projectilePrefabs.ToArray());
			content.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray());
			yield break;
		}
	}
	[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.*/)]
	[R2APISubmoduleDependency(new string[] { "RecalculateStatsAPI", "PrefabAPI", "DamageAPI", "SoundAPI", "LoadoutAPI", "DirectorAPI" })]
	[BepInPlugin("com.Moffein.Potmobile", "Potmobile", "1.4.7")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class PotmobilePlugin : BaseUnityPlugin
	{
		public class StageSpawnInfo
		{
			private string stageName;

			private int minStages;

			public StageSpawnInfo(string stageName, int minStages)
			{
				this.stageName = stageName;
				this.minStages = minStages;
			}

			public string GetStageName()
			{
				return stageName;
			}

			public int GetMinStages()
			{
				return minStages;
			}
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<char, bool> <>9__40_0;

			public static Func<char, bool> <>9__40_1;

			public static hook_OnCollisionEnter <>9__45_0;

			public static hook_OnTriggerEnter <>9__45_1;

			internal bool <ReadConfig>b__40_0(char c)
			{
				return !char.IsWhiteSpace(c);
			}

			internal bool <ReadConfig>b__40_1(char c)
			{
				return !char.IsWhiteSpace(c);
			}

			internal void <FixVehicleForceZoneFriendlyFire>b__45_0(orig_OnCollisionEnter orig, VehicleForceZone self, Collision collision)
			{
				//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_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_008a: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				if (Object.op_Implicit((Object)(object)collision.collider))
				{
					CharacterBody component = ((Component)collision.collider).GetComponent<CharacterBody>();
					if (Object.op_Implicit((Object)(object)component))
					{
						CharacterBody componentInParent = ((Component)self).GetComponentInParent<CharacterBody>();
						if (Object.op_Implicit((Object)(object)componentInParent))
						{
							bool flag = Object.op_Implicit((Object)(object)componentInParent.teamComponent) && Object.op_Implicit((Object)(object)component.teamComponent) && componentInParent.teamComponent.teamIndex == component.teamComponent.teamIndex;
							bool flag2 = component.bodyIndex == PotmobileContent.PotmobileBodyIndex || component.bodyIndex == PotmobileContent.HaulerBodyIndex;
							if (flag && ((flag2 && !impactFriendlyFirePotmobileEnabled) || (!flag2 && !impactFriendlyFireEnabled)))
							{
								return;
							}
						}
					}
				}
				orig.Invoke(self, collision);
			}

			internal void <FixVehicleForceZoneFriendlyFire>b__45_1(orig_OnTriggerEnter orig, VehicleForceZone self, Collider other)
			{
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_0080: Unknown result type (might be due to invalid IL or missing references)
				//IL_0085: Unknown result type (might be due to invalid IL or missing references)
				if (Object.op_Implicit((Object)(object)other))
				{
					CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
					if (Object.op_Implicit((Object)(object)component))
					{
						CharacterBody componentInParent = ((Component)self).GetComponentInParent<CharacterBody>();
						if (Object.op_Implicit((Object)(object)componentInParent))
						{
							bool flag = Object.op_Implicit((Object)(object)componentInParent.teamComponent) && Object.op_Implicit((Object)(object)component.teamComponent) && componentInParent.teamComponent.teamIndex == component.teamComponent.teamIndex;
							bool flag2 = component.bodyIndex == PotmobileContent.PotmobileBodyIndex || component.bodyIndex == PotmobileContent.HaulerBodyIndex;
							if (flag && ((flag2 && !impactFriendlyFirePotmobileEnabled) || (!flag2 && !impactFriendlyFireEnabled)))
							{
								return;
							}
						}
					}
				}
				orig.Invoke(self, other);
			}
		}

		public static bool classicItemsLoaded = false;

		public static bool scepterPluginLoaded = false;

		public static bool riskOfOptionsLoaded = false;

		public static bool rideMeExtendedLoaded = false;

		public static PluginInfo pluginInfo;

		public static float potSortPosition = 9999f;

		public static float haulSortPosition = 10000f;

		public static string stagesPotmobile = string.Empty;

		public static string stagesHauler = string.Empty;

		public static List<StageSpawnInfo> StageListPotmobile = new List<StageSpawnInfo>();

		public static List<StageSpawnInfo> StageListHauler = new List<StageSpawnInfo>();

		public static bool fixJumpPad = true;

		public static bool impactFriendlyFireEnabled = false;

		public static bool impactFriendlyFirePotmobileEnabled = true;

		public static float haulerForce;

		public static float potmobileForce;

		public static float potmobileImpactMult;

		public static float haulerImpactMult;

		public static float potmobileMinDamageSpeed;

		public static float haulerMinDamageSpeed;

		public static float potmobileDoubleDamageSpeed;

		public static float haulerDoubleDamageSpeed;

		public static float potmobileMinRamDamage;

		public static float haulerMinRamDamage;

		public static float potmobileReverseCoefficient;

		public static float haulerReverseCoefficient;

		public static bool ramEnabled = true;

		public static bool ramDisableOnEnemies = true;

		public static bool ramDisableAgainstPlayerPotmobiles = true;

		public static int secondaryStocks;

		public static int utilityStocks;

		public static int specialStocks;

		public static float secondaryCooldown;

		public static float utilityCooldown;

		public static float specialCooldown;

		public static float primaryRadius;

		public static bool stridesHeresyAdjustment;

		public static ConfigEntry<KeyboardShortcut> honkButton;

		public void Awake()
		{
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			Files.PluginInfo = ((BaseUnityPlugin)this).Info;
			scepterPluginLoaded = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");
			riskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
			classicItemsLoaded = Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.ClassicItems");
			rideMeExtendedLoaded = Chainloader.PluginInfos.ContainsKey("com.Mico27.RideMeExtended");
			pluginInfo = ((BaseUnityPlugin)this).Info;
			Assets.Init();
			ReadConfig();
			Tokens.Init();
			DamageTypeSetup.Init();
			new PotmobileCore();
			new HaulerCore();
			FixJumpPad();
			EnemySetup.Init();
			FixVehicleForceZoneFriendlyFire();
			new ItemDisplayCore();
			ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(LateSetup));
		}

		public void Start()
		{
			SoundBanks.Init();
		}

		private void ReadConfig()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_002c: Expected O, but got Unknown
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_0061: Expected O, but got Unknown
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Expected O, but got Unknown
			//IL_009a: Expected O, but got Unknown
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Expected O, but got Unknown
			//IL_00ce: Expected O, but got Unknown
			//IL_00e8: 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_0107: Expected O, but got Unknown
			//IL_0107: Expected O, but got Unknown
			//IL_0121: 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_013c: Expected O, but got Unknown
			//IL_013c: Expected O, but got Unknown
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Expected O, but got Unknown
			//IL_0171: Expected O, but got Unknown
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Expected O, but got Unknown
			//IL_01a6: Expected O, but got Unknown
			//IL_01c0: 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_01db: Expected O, but got Unknown
			//IL_01db: Expected O, but got Unknown
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Expected O, but got Unknown
			//IL_020f: Expected O, but got Unknown
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Expected O, but got Unknown
			//IL_0248: Expected O, but got Unknown
			//IL_0262: 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_027d: Expected O, but got Unknown
			//IL_027d: Expected O, but got Unknown
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Expected O, but got Unknown
			//IL_02b2: Expected O, but got Unknown
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Expected O, but got Unknown
			//IL_02e7: Expected O, but got Unknown
			//IL_0301: 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_031c: Expected O, but got Unknown
			//IL_031c: Expected O, but got Unknown
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Expected O, but got Unknown
			//IL_0351: Expected O, but got Unknown
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Expected O, but got Unknown
			//IL_038a: Expected O, but got Unknown
			//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Expected O, but got Unknown
			//IL_03c3: Expected O, but got Unknown
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Expected O, but got Unknown
			//IL_03fc: Expected O, but got Unknown
			//IL_0416: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Expected O, but got Unknown
			//IL_0435: Expected O, but got Unknown
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0464: Unknown result type (might be due to invalid IL or missing references)
			//IL_046e: Expected O, but got Unknown
			//IL_046e: Expected O, but got Unknown
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_049d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Expected O, but got Unknown
			//IL_04a7: Expected O, but got Unknown
			//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e0: Expected O, but got Unknown
			//IL_04e0: Expected O, but got Unknown
			//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_050b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Expected O, but got Unknown
			//IL_0515: Expected O, but got Unknown
			//IL_052f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0544: Unknown result type (might be due to invalid IL or missing references)
			//IL_054e: Expected O, but got Unknown
			//IL_054e: Expected O, but got Unknown
			//IL_0568: Unknown result type (might be due to invalid IL or missing references)
			//IL_057d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0587: Expected O, but got Unknown
			//IL_0587: Expected O, but got Unknown
			//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c0: Expected O, but got Unknown
			//IL_05c0: Expected O, but got Unknown
			//IL_05da: Unknown result type (might be due to invalid IL or missing references)
			//IL_05eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f5: Expected O, but got Unknown
			//IL_05f5: Expected O, but got Unknown
			//IL_060f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0624: Unknown result type (might be due to invalid IL or missing references)
			//IL_062e: Expected O, but got Unknown
			//IL_062e: Expected O, but got Unknown
			//IL_0648: Unknown result type (might be due to invalid IL or missing references)
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_0663: Expected O, but got Unknown
			//IL_0663: Expected O, but got Unknown
			//IL_067d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0692: Unknown result type (might be due to invalid IL or missing references)
			//IL_069c: Expected O, but got Unknown
			//IL_069c: Expected O, but got Unknown
			//IL_06b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d5: Expected O, but got Unknown
			//IL_06d5: Expected O, but got Unknown
			//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0704: Unknown result type (might be due to invalid IL or missing references)
			//IL_070e: Expected O, but got Unknown
			//IL_070e: Expected O, but got Unknown
			//IL_0728: Unknown result type (might be due to invalid IL or missing references)
			//IL_073d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0747: Expected O, but got Unknown
			//IL_0747: Expected O, but got Unknown
			//IL_0761: 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_0780: Expected O, but got Unknown
			//IL_0780: Expected O, but got Unknown
			//IL_079a: Unknown result type (might be due to invalid IL or missing references)
			//IL_07af: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b9: Expected O, but got Unknown
			//IL_07b9: Expected O, but got Unknown
			//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f2: Expected O, but got Unknown
			//IL_07f2: Expected O, but got Unknown
			//IL_080c: 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_082b: Expected O, but got Unknown
			//IL_082b: Expected O, but got Unknown
			//IL_0845: Unknown result type (might be due to invalid IL or missing references)
			//IL_085a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0864: Expected O, but got Unknown
			//IL_0864: Expected O, but got Unknown
			//IL_087e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0893: Unknown result type (might be due to invalid IL or missing references)
			//IL_089d: Expected O, but got Unknown
			//IL_089d: Expected O, but got Unknown
			//IL_08b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d6: Expected O, but got Unknown
			//IL_08d6: Expected O, but got Unknown
			//IL_08f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0901: Unknown result type (might be due to invalid IL or missing references)
			//IL_090b: Expected O, but got Unknown
			//IL_090b: Expected O, but got Unknown
			//IL_0925: Unknown result type (might be due to invalid IL or missing references)
			//IL_0936: Unknown result type (might be due to invalid IL or missing references)
			//IL_0940: Expected O, but got Unknown
			//IL_0940: Expected O, but got Unknown
			//IL_095a: Unknown result type (might be due to invalid IL or missing references)
			//IL_096c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0976: Expected O, but got Unknown
			//IL_0976: Expected O, but got Unknown
			//IL_0990: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ac: Expected O, but got Unknown
			//IL_09ac: Expected O, but got Unknown
			//IL_09c6: 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_09e1: Expected O, but got Unknown
			//IL_09e1: Expected O, but got Unknown
			//IL_09fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a16: Expected O, but got Unknown
			//IL_0a16: Expected O, but got Unknown
			//IL_0a30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a45: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4f: Expected O, but got Unknown
			//IL_0a4f: Expected O, but got Unknown
			//IL_0a69: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a88: Expected O, but got Unknown
			//IL_0a88: Expected O, but got Unknown
			fixJumpPad = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "Fix Jump Pads"), true, new ConfigDescription("Fixes Potmobiles ignoring jump pads.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			SpeedController.allowReverse = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "Allow Reverse"), true, new ConfigDescription("Allow Potmobiles to reverse.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			honkButton = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("General", "Honk Button"), KeyboardShortcut.Empty, new ConfigDescription("Button to honk.", (AcceptableValueBase)null, Array.Empty<object>()));
			potmobileImpactMult = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("General", "Impact Force Multiplier (Potmobile)"), 1f, new ConfigDescription("Affects knockback force when colliding with things.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			haulerImpactMult = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("General", "Impact Force Multiplier (Hauler)"), 1f, new ConfigDescription("Affects knockback force when colliding with things.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			impactFriendlyFireEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "Impact Friendly Fire"), false, new ConfigDescription("Colliding with teammates sends them flying.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			impactFriendlyFirePotmobileEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "Impact Friendly Fire (Vehicles)"), true, new ConfigDescription("Colliding with teammate Potmobiles and Haulers sends them flying.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			stridesHeresyAdjustment = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "Strides of Heresy Adjustment"), true, new ConfigDescription("Using Strides of Heresy auto aligns the body.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			Reset.resetVelocity = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "Special Reset Velocity"), false, new ConfigDescription("Reset velocity to 0 when using the Special.", (AcceptableValueBase)null, Array.Empty<object>()));
			potSortPosition = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Survivor", "Sort Position (Potmobile)"), 9999f, new ConfigDescription("Position of Potmobile in the Survivor Select menu.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			haulSortPosition = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Survivor", "Sort Position (Hauler)"), 10000f, new ConfigDescription("Position of Hauler in the Survivor Select menu.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			GiveItemsOnSpawn.giveVase = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Survivor", "Start with Vase"), true, new ConfigDescription("Gives an Eccentric Vase if your equipment slot is empty so that you can skip platforming sections.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			ramEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Ramming", "Enabled"), true, new ConfigDescription("Ramming enemies deals damage.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			ramDisableOnEnemies = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Ramming", "Disable on Enemies"), true, new ConfigDescription("Enemy Potmobiles and Haulers dont deal ram damage.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			ramDisableAgainstPlayerPotmobiles = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Ramming", "Disable against Player Vehicles"), true, new ConfigDescription("Player-controlled Potmobiles and Haulers don't deal ram damage to each other.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			FirePotCannon.enableICBMSynergy = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Stats", "Primary - ICBM Synergy"), true, new ConfigDescription("Primary is affected by ICBM.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			FirePotCannon.damageCoefficient = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Primary - Damage Coefficient"), 10f, new ConfigDescription("How much damage this attack deals. (changes do not show up in skill description)", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			FirePotCannon.force = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Primary - Force"), 2500f, new ConfigDescription("Knockback power against enemies.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			FirePotCannon.baseDuration = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Primary - Duration"), 1f, new ConfigDescription("How long it takes to fire each shot.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			primaryRadius = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Primary - Blast Radius"), 8f, new ConfigDescription("Blast radius of the primary attack.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			PushAll.jumpVelocity = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Secondary - Bounce Velocity"), 32f, new ConfigDescription("Jump power of vertical bounce.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			PushAll.radius = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Secondary - Push Radius"), 12f, new ConfigDescription("Radius of push effect against enemies.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			PushAll.force = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Secondary - Push Force"), 4500f, new ConfigDescription("Power of push effect.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			secondaryStocks = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Stats", "Secondary Stocks"), 3, new ConfigDescription("How many charges this skill has.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			secondaryCooldown = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Secondary Cooldown"), 5f, new ConfigDescription("How long this skill takes to recharge.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			Boost.baseDuration = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Utility - Boost Duration"), 2.5f, new ConfigDescription("Length of Nitro Rush.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			Boost.forceMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Utility - Speed Multiplier"), 2f, new ConfigDescription("Speed multiplier while using Nitro Rush.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			utilityStocks = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Stats", "Utility Stocks"), 3, new ConfigDescription("How many charges this skill has.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			utilityCooldown = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Utility Cooldown"), 7f, new ConfigDescription("How long this skill takes to recharge.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			specialStocks = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Stats", "Special Stocks"), 3, new ConfigDescription("How many charges this skill has.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			specialCooldown = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Special Cooldown"), 5f, new ConfigDescription("How long this skill takes to recharge.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			potmobileForce = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Potmobile", "Motor Force"), 15000f, new ConfigDescription("Affects the speed of this vehicle.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			potmobileMinDamageSpeed = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Potmobile", "Min Ram Speed"), 10f, new ConfigDescription("Minimum speed to deal ram damage with this vehicle.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			potmobileDoubleDamageSpeed = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Potmobile", "Double Damage Ram Speed"), 20f, new ConfigDescription("Speed at which ramming damage is doubled.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			potmobileMinRamDamage = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Potmobile", "Min Ram Damage Coefficient"), 4.5f, new ConfigDescription("Damage dealt when ramming at minimum speed.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			potmobileReverseCoefficient = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Potmobile", "Reverse Speed Coefficient"), 0.8f, new ConfigDescription("Motor force is multiplied by this when reversing.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			haulerForce = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Hauler", "Motor Force"), 3000f, new ConfigDescription("Affects the speed of this vehicle.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			haulerMinDamageSpeed = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Hauler", "Min Ram Speed"), 10f, new ConfigDescription("Minimum speed to deal ram damage with this vehicle.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			haulerDoubleDamageSpeed = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Hauler", "Double Damage Ram Speed"), 20f, new ConfigDescription("Speed at which ramming damage is doubled.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			haulerMinRamDamage = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Hauler", "Min Ram Damage Coefficient"), 4.5f, new ConfigDescription("Damage dealt when ramming at minimum speed.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			haulerReverseCoefficient = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats - Hauler", "Reverse Speed Coefficient"), 0.8f, new ConfigDescription("Motor force is multiplied by this when reversing.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			EnemySetup.enableEnemy = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enemy", "Enable"), false, new ConfigDescription("Adds Potmobiles and Haulers to the enemy spawn pool.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			EnemySetup.enableDissonance = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enemy", "Dissonance"), true, new ConfigDescription("Adds Potmobiles and Haulers to the Dissonance spawn pool if the enemy is enabled.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			EnemySetup.potmobileCost = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Enemy", "Director Cost (Potmobile)"), 80, new ConfigDescription("Cost of spawning a Potmobile.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			EnemySetup.haulerCost = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Enemy", "Director Cost (Hauler)"), 120, new ConfigDescription("Cost of spawning a Hauler.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			EnemySetup.nerfPotmobile = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enemy", "Nerf Potmobile"), true, new ConfigDescription("Nerfs NPC Potmobiles and Haulers so they don't instakill you.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			EnemySetup.nerfHauler = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enemy", "Nerf Hauler"), true, new ConfigDescription("Nerfs NPC Haulers so they don't instakill you.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			stagesPotmobile = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Enemy", "Stage List (Potmobile)"), "golemplains - loop, itgolemplains, goolake, itgoolake, frozenwall, itfrozenwall, snowyforest - loop, drybasin, forgottenhaven, goldshores", new ConfigDescription("What stages Potmobiles will show up on. Add a '- loop' after the stagename to make it only spawn after looping. List of stage names can be found at https://github.com/risk-of-thunder/R2Wiki/wiki/List-of-scene-names", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			stagesHauler = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Enemy", "Stage List (Hauler)"), "golemplains - loop, itgolemplains, goolake, itgoolake, frozenwall, itfrozenwall, snowyforest - loop, drybasin, forgottenhaven, goldshores", new ConfigDescription("What stages Haulers will show up on. Add a '- loop' after the stagename to make it only spawn after looping. List of stage names can be found at https://github.com/risk-of-thunder/R2Wiki/wiki/List-of-scene-names", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			stagesPotmobile = new string((from c in stagesPotmobile.ToCharArray()
				where !char.IsWhiteSpace(c)
				select c).ToArray());
			string[] array = stagesPotmobile.Split(new char[1] { ',' });
			string[] array2 = array;
			foreach (string text in array2)
			{
				string[] array3 = text.Split(new char[1] { '-' });
				string stageName = array3[0];
				int minStages = 0;
				if (array3.Length > 1)
				{
					minStages = 5;
				}
				StageListPotmobile.Add(new StageSpawnInfo(stageName, minStages));
			}
			stagesHauler = new string((from c in stagesHauler.ToCharArray()
				where !char.IsWhiteSpace(c)
				select c).ToArray());
			string[] array4 = stagesHauler.Split(new char[1] { ',' });
			string[] array5 = array4;
			foreach (string text2 in array5)
			{
				string[] array6 = text2.Split(new char[1] { '-' });
				string stageName2 = array6[0];
				int minStages2 = 0;
				if (array6.Length > 1)
				{
					minStages2 = 5;
				}
				StageListHauler.Add(new StageSpawnInfo(stageName2, minStages2));
			}
			if (riskOfOptionsLoaded)
			{
				RiskOfOptionsCompat();
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private void RiskOfOptionsCompat()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			ModSettingsManager.SetModIcon(Assets.assetBundle.LoadAsset<Sprite>("texIconPotmobile.png"));
			ModSettingsManager.AddOption((BaseOption)new KeyBindOption(honkButton));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Reset.resetVelocity));
		}

		private void LateSetup()
		{
			//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_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			PotmobileContent.PotmobileBodyIndex = BodyCatalog.FindBodyIndex("MoffeinPotmobileBody");
			PotmobileContent.HaulerBodyIndex = BodyCatalog.FindBodyIndex("MoffeinHaulerBody");
			EnemySetup.SetSpawns();
		}

		private void FixJumpPad()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			if (fixJumpPad)
			{
				JumpVolume.OnTriggerStay += new hook_OnTriggerStay(JumpPadFix);
			}
		}

		private void JumpPadFix(orig_OnTriggerStay orig, JumpVolume self, Collider other)
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, other);
			if (Object.op_Implicit((Object)(object)((Component)other).gameObject))
			{
				SpeedController component = ((Component)other).gameObject.GetComponent<SpeedController>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.rigidbody) && component.HasEffectiveAuthority())
				{
					component.rigidbody.velocity = 1.15f * self.jumpVelocity;
				}
			}
		}

		private void FixVehicleForceZoneFriendlyFire()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			if (impactFriendlyFireEnabled && impactFriendlyFirePotmobileEnabled)
			{
				return;
			}
			object obj = <>c.<>9__45_0;
			if (obj == null)
			{
				hook_OnCollisionEnter val = delegate(orig_OnCollisionEnter orig, VehicleForceZone self, Collision collision)
				{
					//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_0065: Unknown result type (might be due to invalid IL or missing references)
					//IL_0070: Unknown result type (might be due to invalid IL or missing references)
					//IL_008a: Unknown result type (might be due to invalid IL or missing references)
					//IL_008f: Unknown result type (might be due to invalid IL or missing references)
					if (Object.op_Implicit((Object)(object)collision.collider))
					{
						CharacterBody component2 = ((Component)collision.collider).GetComponent<CharacterBody>();
						if (Object.op_Implicit((Object)(object)component2))
						{
							CharacterBody componentInParent2 = ((Component)self).GetComponentInParent<CharacterBody>();
							if (Object.op_Implicit((Object)(object)componentInParent2))
							{
								bool flag3 = Object.op_Implicit((Object)(object)componentInParent2.teamComponent) && Object.op_Implicit((Object)(object)component2.teamComponent) && componentInParent2.teamComponent.teamIndex == component2.teamComponent.teamIndex;
								bool flag4 = component2.bodyIndex == PotmobileContent.PotmobileBodyIndex || component2.bodyIndex == PotmobileContent.HaulerBodyIndex;
								if (flag3 && ((flag4 && !impactFriendlyFirePotmobileEnabled) || (!flag4 && !impactFriendlyFireEnabled)))
								{
									return;
								}
							}
						}
					}
					orig.Invoke(self, collision);
				};
				<>c.<>9__45_0 = val;
				obj = (object)val;
			}
			VehicleForceZone.OnCollisionEnter += (hook_OnCollisionEnter)obj;
			object obj2 = <>c.<>9__45_1;
			if (obj2 == null)
			{
				hook_OnTriggerEnter val2 = delegate(orig_OnTriggerEnter orig, VehicleForceZone self, Collider other)
				{
					//IL_0073: Unknown result type (might be due to invalid IL or missing references)
					//IL_0078: Unknown result type (might be due to invalid IL or missing references)
					//IL_005b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0066: Unknown result type (might be due to invalid IL or missing references)
					//IL_0080: Unknown result type (might be due to invalid IL or missing references)
					//IL_0085: Unknown result type (might be due to invalid IL or missing references)
					if (Object.op_Implicit((Object)(object)other))
					{
						CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
						if (Object.op_Implicit((Object)(object)component))
						{
							CharacterBody componentInParent = ((Component)self).GetComponentInParent<CharacterBody>();
							if (Object.op_Implicit((Object)(object)componentInParent))
							{
								bool flag = Object.op_Implicit((Object)(object)componentInParent.teamComponent) && Object.op_Implicit((Object)(object)component.teamComponent) && componentInParent.teamComponent.teamIndex == component.teamComponent.teamIndex;
								bool flag2 = component.bodyIndex == PotmobileContent.PotmobileBodyIndex || component.bodyIndex == PotmobileContent.HaulerBodyIndex;
								if (flag && ((flag2 && !impactFriendlyFirePotmobileEnabled) || (!flag2 && !impactFriendlyFireEnabled)))
								{
									return;
								}
							}
						}
					}
					orig.Invoke(self, other);
				};
				<>c.<>9__45_1 = val2;
				obj2 = (object)val2;
			}
			VehicleForceZone.OnTriggerEnter += (hook_OnTriggerEnter)obj2;
		}

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

		public static void SetupHitbox(GameObject prefab, string hitboxName, params Transform[] hitboxTransforms)
		{
			HitBoxGroup val = prefab.AddComponent<HitBoxGroup>();
			List<HitBox> list = new List<HitBox>();
			foreach (Transform val2 in hitboxTransforms)
			{
				HitBox item = ((Component)val2).gameObject.AddComponent<HitBox>();
				((Component)val2).gameObject.layer = LayerIndex.projectile.intVal;
				list.Add(item);
			}
			val.hitBoxes = list.ToArray();
			val.groupName = hitboxName;
		}

		public static bool GetKeyPressed(ConfigEntry<KeyboardShortcut> entry)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			KeyboardShortcut value = entry.Value;
			foreach (KeyCode modifier in ((KeyboardShortcut)(ref value)).Modifiers)
			{
				if (!Input.GetKey(modifier))
				{
					return false;
				}
			}
			value = entry.Value;
			return Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey);
		}
	}
	public static class DamageTypeSetup
	{
		private static bool initialized;

		public static void Init()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Expected O, but got Unknown
			if (!initialized)
			{
				initialized = true;
				PotmobileContent.ModdedDamageTypes.BonusForceToPotmobile = DamageAPI.ReserveDamageType();
				PotmobileContent.ModdedDamageTypes.SquashOnKill = DamageAPI.ReserveDamageType();
				PotmobileContent.ModdedDamageTypes.PotmobileRam = DamageAPI.ReserveDamageType();
				HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			}
		}

		private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: 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_0162: 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_0186: 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_01b0: 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_01bb: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active)
			{
				if (DamageAPI.HasModdedDamageType(damageInfo, PotmobileContent.ModdedDamageTypes.BonusForceToPotmobile) && (self.body.bodyIndex == PotmobileContent.PotmobileBodyIndex || self.body.bodyIndex == PotmobileContent.HaulerBodyIndex))
				{
					damageInfo.force *= 4f;
				}
				if (Object.op_Implicit((Object)(object)damageInfo.attacker))
				{
					if (DamageAPI.HasModdedDamageType(damageInfo, PotmobileContent.ModdedDamageTypes.SquashOnKill))
					{
						PotmobileNetworkComponent component = damageInfo.attacker.GetComponent<PotmobileNetworkComponent>();
						if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)self.body.master))
						{
							NetworkIdentity component2 = ((Component)self.body.master).GetComponent<NetworkIdentity>();
							if (Object.op_Implicit((Object)(object)component2))
							{
								NetworkInstanceId netId = component2.netId;
								component.SquashEnemy(((NetworkInstanceId)(ref netId)).Value);
							}
						}
					}
					CharacterBody component3 = damageInfo.attacker.GetComponent<CharacterBody>();
					if (Object.op_Implicit((Object)(object)component3) && DamageAPI.HasModdedDamageType(damageInfo, PotmobileContent.ModdedDamageTypes.PotmobileRam) && PotmobilePlugin.ramDisableAgainstPlayerPotmobiles && self.body.isPlayerControlled && component3.isPlayerControlled)
					{
						bool flag = component3.bodyIndex == PotmobileContent.PotmobileBodyIndex || component3.bodyIndex == PotmobileContent.HaulerBodyIndex;
						bool flag2 = self.body.bodyIndex == PotmobileContent.PotmobileBodyIndex || self.body.bodyIndex == PotmobileContent.HaulerBodyIndex;
						if (flag && flag2)
						{
							damageInfo.damage = 0f;
							damageInfo.damageType = (DamageType)(damageInfo.damageType | 0x800);
							damageInfo.rejected = true;
						}
					}
				}
			}
			orig.Invoke(self, damageInfo);
		}
	}
	public static class EnemySetup
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static StatHookEventHandler <>9__11_0;

			internal void <NerfEnemy>b__11_0(CharacterBody sender, StatHookEventArgs args)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: 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_0053: Invalid comparison between Unknown and I4
				if (((sender.bodyIndex == PotmobileContent.PotmobileBodyIndex && nerfPotmobile) || (sender.bodyIndex == PotmobileContent.HaulerBodyIndex && nerfHauler)) && !sender.isPlayerControlled && Object.op_Implicit((Object)(object)sender.teamComponent) && (int)sender.teamComponent.teamIndex != 1)
				{
					float num = sender.level - 1f;
					args.baseRegenAdd -= sender.baseRegen + sender.levelRegen * num;
					args.baseDamageAdd -= 0.8f * (sender.baseDamage + sender.levelDamage * num);
				}
			}
		}

		public static bool nerfPotmobile = true;

		public static bool nerfHauler = true;

		private static bool initialized = false;

		private static bool setSpawns = false;

		public static bool enableEnemy = false;

		public static bool enableDissonance = true;

		public static int potmobileCost = 80;

		public static int haulerCost = 80;

		public static void Init()
		{
			if (!initialized)
			{
				initialized = true;
				BuildCards();
				NerfEnemy();
			}
		}

		public static bool ShouldApplyEnemyDebuff(CharacterBody cb)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Invalid comparison between Unknown and I4
			if (!cb.isPlayerControlled)
			{
				return false;
			}
			bool flag = cb.bodyIndex == PotmobileContent.PotmobileBodyIndex && nerfPotmobile;
			bool flag2 = cb.bodyIndex == PotmobileContent.HaulerBodyIndex && nerfHauler;
			if (!flag && !flag2)
			{
				return false;
			}
			bool flag3 = Object.op_Implicit((Object)(object)cb.teamComponent) && (int)cb.teamComponent.teamIndex == 1;
			bool flag4 = CheckChirrBuff(cb);
			if (flag3 && !flag4)
			{
				return false;
			}
			return true;
		}

		private static bool CheckChirrBuff(CharacterBody cb)
		{
			//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_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Invalid comparison between Unknown and I4
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Invalid comparison between Unknown and I4
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			BuffIndex val = BuffCatalog.FindBuffIndex("SS2UChirrFriendBuff");
			if ((int)val != -1 && cb.HasBuff(val))
			{
				return true;
			}
			BuffIndex val2 = BuffCatalog.FindBuffIndex("BuffChirrFriend");
			return (int)val2 != -1 && cb.HasBuff(val2);
		}

		private static void NerfEnemy()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			object obj = <>c.<>9__11_0;
			if (obj == null)
			{
				StatHookEventHandler val = delegate(CharacterBody sender, StatHookEventArgs args)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_0016: Unknown result type (might be due to invalid IL or missing references)
					//IL_001b: 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_0053: Invalid comparison between Unknown and I4
					if (((sender.bodyIndex == PotmobileContent.PotmobileBodyIndex && nerfPotmobile) || (sender.bodyIndex == PotmobileContent.HaulerBodyIndex && nerfHauler)) && !sender.isPlayerControlled && Object.op_Implicit((Object)(object)sender.teamComponent) && (int)sender.teamComponent.teamIndex != 1)
					{
						float num = sender.level - 1f;
						args.baseRegenAdd -= sender.baseRegen + sender.levelRegen * num;
						args.baseDamageAdd -= 0.8f * (sender.baseDamage + sender.levelDamage * num);
					}
				};
				<>c.<>9__11_0 = val;
				obj = (object)val;
			}
			RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
		}

		private static void BuildCards()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Expected O, but got Unknown
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Expected O, but got Unknown
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: 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_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Expected O, but got Unknown
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Expected O, but got Unknown
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Expected O, but got Unknown
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: 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_01da: Expected O, but got Unknown
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Expected O, but got Unknown
			CharacterSpawnCard val = ScriptableObject.CreateInstance<CharacterSpawnCard>();
			((Object)val).name = "cscPotmobile";
			((SpawnCard)val).prefab = PotmobileContent.PotmobileMasterObject;
			((SpawnCard)val).sendOverNetwork = true;
			((SpawnCard)val).hullSize = (HullClassification)1;
			((SpawnCard)val).nodeGraphType = (GraphType)0;
			((SpawnCard)val).requiredFlags = (NodeFlags)0;
			((SpawnCard)val).forbiddenFlags = (NodeFlags)4;
			((SpawnCard)val).directorCreditCost = potmobileCost;
			((SpawnCard)val).occupyPosition = false;
			val.loadout = new SerializableLoadout();
			val.noElites = false;
			val.forbiddenAsBoss = false;
			DirectorCard card = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val,
				selectionWeight = 1,
				preventOverhead = false,
				minimumStageCompletions = 0,
				spawnDistance = (MonsterSpawnDistance)0
			};
			DirectorCardHolder potmobileCard = new DirectorCardHolder
			{
				Card = card,
				MonsterCategory = (MonsterCategory)3
			};
			DirectorCard card2 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val,
				selectionWeight = 1,
				preventOverhead = false,
				minimumStageCompletions = 5,
				spawnDistance = (MonsterSpawnDistance)0
			};
			DirectorCardHolder potmobileLoopCard = new DirectorCardHolder
			{
				Card = card2,
				MonsterCategory = (MonsterCategory)3
			};
			PotmobileContent.PotmobileCard = potmobileCard;
			PotmobileContent.PotmobileLoopCard = potmobileLoopCard;
			CharacterSpawnCard val2 = ScriptableObject.CreateInstance<CharacterSpawnCard>();
			((Object)val2).name = "cscHauler";
			((SpawnCard)val2).prefab = PotmobileContent.HaulerMasterObject;
			((SpawnCard)val2).sendOverNetwork = true;
			((SpawnCard)val2).hullSize = (HullClassification)1;
			((SpawnCard)val2).nodeGraphType = (GraphType)0;
			((SpawnCard)val2).requiredFlags = (NodeFlags)0;
			((SpawnCard)val2).forbiddenFlags = (NodeFlags)4;
			((SpawnCard)val2).directorCreditCost = potmobileCost;
			((SpawnCard)val2).occupyPosition = false;
			val2.loadout = new SerializableLoadout();
			val2.noElites = false;
			val2.forbiddenAsBoss = false;
			DirectorCard card3 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val2,
				selectionWeight = 1,
				preventOverhead = false,
				minimumStageCompletions = 0,
				spawnDistance = (MonsterSpawnDistance)0
			};
			DirectorCardHolder haulerCard = new DirectorCardHolder
			{
				Card = card3,
				MonsterCategory = (MonsterCategory)3
			};
			DirectorCard card4 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val2,
				selectionWeight = 1,
				preventOverhead = false,
				minimumStageCompletions = 5,
				spawnDistance = (MonsterSpawnDistance)0
			};
			DirectorCardHolder haulerLoopCard = new DirectorCardHolder
			{
				Card = card4,
				MonsterCategory = (MonsterCategory)3
			};
			PotmobileContent.HaulerCard = haulerCard;
			PotmobileContent.HaulerLoopCard = haulerLoopCard;
		}

		public static void SetSpawns()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			if (!enableEnemy || setSpawns)
			{
				return;
			}
			setSpawns = true;
			if (enableDissonance)
			{
				DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/MixEnemy/dccsMixEnemy.asset").WaitForCompletion();
				int num = FindCategoryIndexByName(val, "Minibosses");
				if (num >= 0)
				{
					val.AddCard(num, PotmobileContent.PotmobileCard.Card);
				}
			}
			foreach (PotmobilePlugin.StageSpawnInfo item in PotmobilePlugin.StageListPotmobile)
			{
				DirectorCardHolder val2 = ((item.GetMinStages() == 0) ? PotmobileContent.PotmobileCard : PotmobileContent.PotmobileLoopCard);
				SceneDef val3 = ScriptableObject.CreateInstance<SceneDef>();
				val3.baseSceneNameOverride = item.GetStageName();
				Helpers.AddNewMonsterToStage(val2, false, DirectorAPI.GetStageEnumFromSceneDef(val3), item.GetStageName());
			}
			foreach (PotmobilePlugin.StageSpawnInfo item2 in PotmobilePlugin.StageListHauler)
			{
				DirectorCardHolder val4 = ((item2.GetMinStages() == 0) ? PotmobileContent.HaulerCard : PotmobileContent.HaulerLoopCard);
				SceneDef val5 = ScriptableObject.CreateInstance<SceneDef>();
				val5.baseSceneNameOverride = item2.GetStageName();
				Helpers.AddNewMonsterToStage(val4, false, DirectorAPI.GetStageEnumFromSceneDef(val5), item2.GetStageName());
			}
		}

		public static int FindCategoryIndexByName(DirectorCardCategorySelection dcs, string categoryName)
		{
			for (int i = 0; i < dcs.categories.Length; i++)
			{
				if (string.CompareOrdinal(dcs.categories[i].name, categoryName) == 0)
				{
					return i;
				}
			}
			return -1;
		}
	}
	internal static class Files
	{
		public static PluginInfo PluginInfo;

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

		internal static void Init(PluginInfo info)
		{
			PluginInfo = info;
		}

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

		internal static string GetPathToFile(string fileName)
		{
			return Path.Combine(assemblyDir, fileName);
		}
	}
	public static class MasterSetup
	{
		public static void CreatePotmobileMaster()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)PotmobileContent.PotmobileMasterObject))
			{
				GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoMonsterMaster.prefab").WaitForCompletion(), "MoffeinPotmobileMaster", true);
				CharacterMaster component = val.GetComponent<CharacterMaster>();
				component.bodyPrefab = PotmobileContent.PotmobileBodyObject;
				RemoveAISkillDrivers(val);
				AddAISkillDriver(val, "Reset", (SkillSlot)3, null, requireSkillReady: false, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, float.PositiveInfinity, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: true, shouldFireEquipment: false, (ButtonPressType)0, 0.25f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: true, null);
				AddAISkillDriver(val, "Boost", (SkillSlot)2, null, requireSkillReady: false, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 50f, float.PositiveInfinity, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: true, shouldFireEquipment: false, (ButtonPressType)0, 0.25f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: true, null);
				AddAISkillDriver(val, "Bounce", (SkillSlot)1, null, requireSkillReady: true, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, 12f, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: false, shouldFireEquipment: false, (ButtonPressType)0, 0.25f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: true, null);
				AddAISkillDriver(val, "Primary", (SkillSlot)0, null, requireSkillReady: true, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, 120f, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: false, shouldFireEquipment: false, (ButtonPressType)0, 1f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: false, null);
				AddAISkillDriver(val, "Chase", (SkillSlot)(-1), null, requireSkillReady: false, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, float.PositiveInfinity, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: true, shouldFireEquipment: false, (ButtonPressType)1, -1f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: false, null);
				PotmobileContent.PotmobileMasterObject = val;
			}
		}

		public static void CreateHaulerMaster()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)PotmobileContent.HaulerMasterObject))
			{
				GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoMonsterMaster.prefab").WaitForCompletion(), "MoffeinHaulerMaster", true);
				CharacterMaster component = val.GetComponent<CharacterMaster>();
				component.bodyPrefab = PotmobileContent.HaulerBodyObject;
				RemoveAISkillDrivers(val);
				AddAISkillDriver(val, "Reset", (SkillSlot)3, null, requireSkillReady: false, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, float.PositiveInfinity, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: true, shouldFireEquipment: false, (ButtonPressType)0, 0.25f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: true, null);
				AddAISkillDriver(val, "Boost", (SkillSlot)2, null, requireSkillReady: false, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 50f, float.PositiveInfinity, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: true, shouldFireEquipment: false, (ButtonPressType)0, 0.25f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: true, null);
				AddAISkillDriver(val, "Bounce", (SkillSlot)1, null, requireSkillReady: true, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, 12f, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: false, shouldFireEquipment: false, (ButtonPressType)0, 0.25f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: true, null);
				AddAISkillDriver(val, "Primary", (SkillSlot)0, null, requireSkillReady: true, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, 120f, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: false, shouldFireEquipment: false, (ButtonPressType)0, 1f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: false, null);
				AddAISkillDriver(val, "Chase", (SkillSlot)(-1), null, requireSkillReady: false, requireEquipmentReady: false, float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity, 0f, float.PositiveInfinity, selectionRequiresTargetLoS: false, selectionRequiresOnGround: false, selectionRequiresAimTarget: false, -1, (TargetType)0, activationRequiresTargetLoS: false, activationRequiresAimTargetLoS: false, activationRequiresAimConfirmation: false, (MovementType)1, 1f, (AimType)2, ignoreNodeGraph: false, shouldSprint: true, shouldFireEquipment: false, (ButtonPressType)1, -1f, resetCurrentEnemyOnNextDriverSelection: false, noRepeat: false, null);
				PotmobileContent.HaulerMasterObject = val;
			}
		}

		private static void RemoveAISkillDrivers(GameObject masterObject)
		{
			AISkillDriver[] components = masterObject.GetComponents<AISkillDriver>();
			for (int i = 0; i < components.Length; i++)
			{
				Object.Destroy((Object)(object)components[i]);
			}
		}

		private static AISkillDriver AddAISkillDriver(GameObject masterObject, string customName, SkillSlot skillSlot, SkillDef requiredSkill, bool requireSkillReady, bool requireEquipmentReady, float minUserHealthFraction, float maxUserHealthFraction, float minTargetHealthFraction, float maxTargetHealthFraction, float minDistance, float maxDistance, bool selectionRequiresTargetLoS, bool selectionRequiresOnGround, bool selectionRequiresAimTarget, int maxTimesSelected, TargetType moveTargetType, bool activationRequiresTargetLoS, bool activationRequiresAimTargetLoS, bool activationRequiresAimConfirmation, MovementType movementType, float moveInputScale, AimType aimType, bool ignoreNodeGraph, bool shouldSprint, bool shouldFireEquipment, ButtonPressType buttonPressType, float driverUpdateTimerOverride, bool resetCurrentEnemyOnNextDriverSelection, bool noRepeat, AISkillDriver nextHighPriorityOverride)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			CharacterMaster component = masterObject.GetComponent<CharacterMaster>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return null;
			}
			AISkillDriver val = masterObject.AddComponent<AISkillDriver>();
			val.customName = customName;
			val.skillSlot = skillSlot;
			val.requiredSkill = requiredSkill;
			val.requireSkillReady = requireSkillReady;
			val.requireEquipmentReady = requireEquipmentReady;
			val.minUserHealthFraction = minUserHealthFraction;
			val.maxUserHealthFraction = maxUserHealthFraction;
			val.minTargetHealthFraction = minTargetHealthFraction;
			val.maxTargetHealthFraction = maxTargetHealth