Decompiled source of Living Traps v1.2.7

LivingTraps.dll

Decompiled 2 weeks ago
using System;
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 System.Text.RegularExpressions;
using System.Threading.Tasks;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalConfig;
using LethalConfig.ConfigItems;
using LethalConfig.ConfigItems.Options;
using LethalLib.Modules;
using LivingTraps;
using LivingTraps.NetcodePatcher;
using Living_Traps;
using Microsoft.CodeAnalysis;
using On;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Rendering.HighDefinition;

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

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
public class TRAPAICORE : EnemyAI
{
	public enum State
	{
		SearchingForPlayer,
		StickingInFrontOfPlayer
	}

	protected PlayerControllerB mostRecentPlayer = null;

	protected GrabbableObject[] source;

	protected int sourcecycle = 75;

	public bool isRootSpawn = true;

	public string selectedType = "";

	protected float stamina = 0f;

	protected bool recovering = false;

	public int provokePoints = 0;

	private float nextDestTime = 0f;

	public Transform turnCompass;

	public Transform attackArea;

	protected float timeSinceHittingLocalPlayer;

	protected float timeSinceNewRandPos;

	protected Vector3 positionRandomness;

	protected Vector3 StalkPos;

	protected Random enemyRandom;

	protected bool isDeadAnimationDone;

	public override void OnDestroy()
	{
		((EnemyAI)this).OnDestroy();
		Debug.Log((object)"Living Trap: Destroyed Self");
	}

	public void setHalo(bool active)
	{
		Transform val = ((Component)this).transform.Find("Halo");
		if (Object.op_Implicit((Object)(object)val))
		{
			((Component)val).gameObject.SetActive(active);
		}
		else
		{
			Debug.LogError((object)"MOAI: failed to find Halo!");
		}
	}

	public PlayerControllerB moaiGetNearestPlayer()
	{
		//IL_006d: 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_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts;
		PlayerControllerB result = null;
		float num = 1E+09f;
		foreach (PlayerControllerB val in allPlayerScripts)
		{
			if (Object.op_Implicit((Object)(object)val) && !val.isPlayerDead && val.isPlayerControlled && Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) < num)
			{
				num = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position);
				result = val;
			}
		}
		return result;
	}

	public void baseInit()
	{
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		Debug.Log((object)"Living Trap: BaseInit");
		source = Object.FindObjectsOfType<GrabbableObject>();
		mostRecentPlayer = moaiGetNearestPlayer();
		timeSinceHittingLocalPlayer = 0f;
		timeSinceNewRandPos = 0f;
		positionRandomness = new Vector3(0f, 0f, 0f);
		enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex);
		isDeadAnimationDone = false;
		base.currentBehaviourStateIndex = 0;
		if (((NetworkBehaviour)RoundManager.Instance).IsHost)
		{
			awaken();
		}
	}

	public async void awaken()
	{
		Debug.Log((object)"Living Trap: Awaken");
		((EnemyAI)this).StopSearch(base.currentSearch, true);
		nextDestTime = Time.time + 0.5f;
		await Task.Delay(2000);
		if (!isRootSpawn)
		{
			return;
		}
		int groupNum = Plugin.rnd.Next(0, Plugin.groupSize.Value);
		for (int i = 0; i < groupNum; i++)
		{
			GameObject dupe = Object.Instantiate<GameObject>(base.enemyType.enemyPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation);
			if (Object.op_Implicit((Object)(object)dupe.GetComponent<NetworkObject>()))
			{
				dupe.GetComponent<NetworkObject>().Spawn(false);
			}
			dupe.GetComponent<LivingTrapAI>().isRootSpawn = false;
			dupe.GetComponent<LivingTrapAI>().selectedType = selectedType;
		}
	}

	public void baseUpdate()
	{
		//IL_0112: Unknown result type (might be due to invalid IL or missing references)
		if (base.isEnemyDead && base.enemyHP > 0)
		{
			((EnemyAI)this).KillEnemyOnOwnerClient(false);
			stopAllSound();
			base.isEnemyDead = true;
			base.enemyHP = 0;
		}
		if (base.isEnemyDead)
		{
			if (!isDeadAnimationDone)
			{
				isDeadAnimationDone = true;
				stopAllSound();
				base.creatureVoice.PlayOneShot(base.dieSFX);
			}
			return;
		}
		if ((Object)(object)base.targetPlayer != (Object)null && base.targetPlayer.isPlayerDead)
		{
			base.targetPlayer = null;
		}
		base.movingTowardsTargetPlayer = (Object)(object)base.targetPlayer != (Object)null;
		timeSinceHittingLocalPlayer += Time.deltaTime;
		timeSinceNewRandPos += Time.deltaTime;
		if ((Object)(object)base.targetPlayer != (Object)null && ((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false))
		{
			turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position);
		}
		if (base.stunNormalizedTimer > 0f)
		{
			base.agent.speed = 0f;
		}
	}

	public void baseAIInterval()
	{
		if (sourcecycle > 0)
		{
			sourcecycle--;
		}
		else
		{
			source = Object.FindObjectsOfType<GrabbableObject>();
			sourcecycle = 75;
		}
		if (stamina <= 0f)
		{
			recovering = true;
		}
		else if (stamina > 60f)
		{
			recovering = false;
		}
		if (sourcecycle % 5 == 0 && stamina < 120f)
		{
			stamina += 3f;
		}
		if ((Object)(object)base.targetPlayer != (Object)null)
		{
			mostRecentPlayer = base.targetPlayer;
		}
	}

	public void baseSearchingForPlayer()
	{
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		base.agent.speed = 3f * Plugin.moaiGlobalSpeed.Value;
		if (FoundClosestPlayerInRange(28f, needLineOfSight: true) || provokePoints > 0)
		{
			((EnemyAI)this).SwitchToBehaviourClientRpc(1);
		}
		else if (nextDestTime < Time.time)
		{
			nextDestTime = (float)((double)Time.time + 6.0 * Plugin.rnd.NextDouble());
			((EnemyAI)this).SetDestinationToPosition(GetRandomNavMeshPosition(((Component)this).transform.position, 25f), false);
		}
	}

	public static Vector3 GetRandomNavMeshPosition(Vector3 center, float range)
	{
		//IL_0006: 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_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: 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_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		NavMeshHit val2 = default(NavMeshHit);
		for (int i = 0; i < 30; i++)
		{
			Vector3 val = center + Random.insideUnitSphere * range;
			val.y = center.y;
			if (NavMesh.SamplePosition(val, ref val2, 3f, -1))
			{
				return ((NavMeshHit)(ref val2)).position;
			}
		}
		Debug.LogWarning((object)"Failed to find random NavMesh position.");
		return center;
	}

	public void baseStickingInFrontOfPlayer(float maxRange = 22f)
	{
		base.agent.speed = 5.3f * Plugin.moaiGlobalSpeed.Value;
		stamina -= 1.5f;
		if (!FoundClosestPlayerInRange(maxRange, needLineOfSight: false) && !FoundClosestPlayerInRange(maxRange + 6f, needLineOfSight: true) && provokePoints <= 0)
		{
			base.targetPlayer = null;
			((EnemyAI)this).SwitchToBehaviourClientRpc(0);
		}
		else
		{
			StickingInFrontOfPlayer();
		}
	}

	public Vector3 objNavPos(GrabbableObject objTarget)
	{
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: 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_004c: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)objTarget))
		{
			return Vector3.zero;
		}
		NavMeshHit val = default(NavMeshHit);
		if (NavMesh.SamplePosition(((Component)objTarget).transform.position, ref val, 5f, -1))
		{
			return ((NavMeshHit)(ref val)).position;
		}
		return Vector3.zero;
	}

	public bool FoundClosestPlayerInRange(float r, bool needLineOfSight)
	{
		if (recovering)
		{
			return false;
		}
		moaiTargetClosestPlayer(r, needLineOfSight);
		if ((Object)(object)base.targetPlayer == (Object)null)
		{
			return false;
		}
		return (Object)(object)base.targetPlayer != (Object)null;
	}

	public bool moaiTargetClosestPlayer(float range, bool requireLineOfSight)
	{
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		if (recovering)
		{
			return false;
		}
		base.mostOptimalDistance = range;
		PlayerControllerB targetPlayer = base.targetPlayer;
		base.targetPlayer = null;
		for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++)
		{
			if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false) && (!requireLineOfSight || ((EnemyAI)this).CheckLineOfSightForPosition(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, 100f, 80, -1f, (Transform)null)))
			{
				base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position);
				if (base.tempDist < base.mostOptimalDistance)
				{
					base.mostOptimalDistance = base.tempDist;
					base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i];
				}
			}
		}
		if ((Object)(object)base.targetPlayer != (Object)null && (Object)(object)targetPlayer != (Object)null)
		{
			base.targetPlayer = targetPlayer;
		}
		return (Object)(object)base.targetPlayer != (Object)null;
	}

	public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1)
	{
	}

	private void StickingInFrontOfPlayer()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)base.targetPlayer == (Object)null) && ((NetworkBehaviour)this).IsOwner)
		{
			StalkPos = ((Component)base.targetPlayer).transform.position;
			((EnemyAI)this).SetDestinationToPosition(StalkPos, false);
		}
	}

	public override void OnCollideWithEnemy(Collider other, EnemyAI collidedEnemy = null)
	{
		if (!(timeSinceHittingLocalPlayer < 0.5f) && !collidedEnemy.isEnemyDead && !base.isEnemyDead && (!((Object)((Component)collidedEnemy).gameObject).name.ToLower().Contains("moai") || ((Component)((Component)this).transform.Find("Halo")).gameObject.activeSelf != ((Component)((Component)collidedEnemy).transform.Find("Halo")).gameObject.activeSelf))
		{
			timeSinceHittingLocalPlayer = 0f;
			collidedEnemy.HitEnemy(1, (PlayerControllerB)null, true, -1);
		}
	}

	public override void OnCollideWithPlayer(Collider other)
	{
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0101: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		if (timeSinceHittingLocalPlayer < 0.5f)
		{
			return;
		}
		PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false);
		if (!((Object)(object)val != (Object)null))
		{
			return;
		}
		timeSinceHittingLocalPlayer = 0f;
		if (!Object.op_Implicit((Object)(object)((Component)this).transform.Find("Halo")) || !((Component)((Component)this).transform.Find("Halo")).gameObject.activeSelf)
		{
			if (val.health < 30)
			{
				val.KillPlayer(val.velocityLastFrame, true, (CauseOfDeath)6, 0, default(Vector3));
			}
			else
			{
				val.DamagePlayer(30, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
			}
		}
		else if (((Component)((Component)this).transform.Find("Halo")).gameObject.activeSelf && val.health <= 90)
		{
			val.DamagePlayer(-10, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
		}
	}

	public virtual void playSoundId(string id)
	{
	}

	public void stopAllSound()
	{
		base.creatureSFX.Stop();
		base.creatureVoice.Stop();
	}

	protected override void __initializeVariables()
	{
		((EnemyAI)this).__initializeVariables();
	}

	protected override void __initializeRpcs()
	{
		((EnemyAI)this).__initializeRpcs();
	}

	protected internal override string __getTypeName()
	{
		return "TRAPAICORE";
	}
}
namespace LivingTraps
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("LivingTraps", "Living Traps", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public static class Assets
		{
			public static AssetBundle MainAssetBundle;

			public static void PopulateAssets()
			{
				string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
				MainAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "livingtrapbundle"));
				if ((Object)(object)MainAssetBundle == (Object)null)
				{
					Logger.LogError((object)"Failed to load custom assets.");
				}
			}
		}

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

			public static hook_ShipHasLeft <>9__11_0;

			internal void <Awake>b__11_0(orig_ShipHasLeft orig, StartOfRound self)
			{
				try
				{
					foreach (GameObject trapObject in trapObjects)
					{
						if (Object.op_Implicit((Object)(object)trapObject))
						{
							Object.Destroy((Object)(object)trapObject);
						}
					}
				}
				catch (Exception ex)
				{
					Debug.Log((object)ex);
				}
				if (trapObjects != null)
				{
					trapObjects.Clear();
				}
				orig.Invoke(self);
			}
		}

		public static Harmony _harmony;

		public static ManualLogSource Logger;

		public static Random rnd = new Random();

		public static float rawSpawnMultiplier = 0f;

		public static EnemyType LivingTrap;

		public static EnemyType LivingTrapInside;

		public static TerminalNode LivingTrapTerminalNode;

		public static TerminalKeyword LivingTrapTerminalKeyword;

		public static List<GameObject> trapObjects;

		public static ConfigEntry<int> rarity;

		public static ConfigEntry<int> rarityIndoors;

		public static ConfigEntry<float> moaiGlobalSpeed;

		public static ConfigEntry<string> trapOptions;

		public static ConfigEntry<int> groupSize;

		public static ConfigEntry<bool> spawnOutdoors;

		public static ConfigEntry<bool> spawnIndoors;

		public static void LogDebug(string text)
		{
			Logger.LogInfo((object)text);
		}

		public static void LogProduction(string text)
		{
			Logger.LogInfo((object)text);
		}

		private void Awake()
		{
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Expected O, but got Unknown
			Logger = ((BaseUnityPlugin)this).Logger;
			Assets.PopulateAssets();
			bindVars();
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
			trapObjects = new List<GameObject>();
			Random.InitState((int)DateTime.Now.Ticks);
			Debug.Log((object)("LivingTrap ENEMY BUNDLE: " + ((object)Assets.MainAssetBundle).ToString()));
			LivingTrap = Assets.MainAssetBundle.LoadAsset<EnemyType>("LivingTrap");
			LivingTrapInside = Assets.MainAssetBundle.LoadAsset<EnemyType>("LivingTrapInside");
			LivingTrapTerminalNode = Assets.MainAssetBundle.LoadAsset<TerminalNode>("LivingTrapTN");
			LivingTrapTerminalKeyword = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("LivingTrapTK");
			Debug.Log((object)("LT" + (object)LivingTrap));
			Debug.Log((object)("LT TN" + (object)LivingTrapTerminalNode));
			Debug.Log((object)("LT TK" + (object)LivingTrapTerminalKeyword));
			NetworkPrefabs.RegisterNetworkPrefab(LivingTrap.enemyPrefab);
			if (spawnOutdoors.Value)
			{
				Enemies.RegisterEnemy(LivingTrap, rarity.Value, (LevelTypes)(-1), (SpawnType)1, LivingTrapTerminalNode, LivingTrapTerminalKeyword);
			}
			if (spawnIndoors.Value)
			{
				Enemies.RegisterEnemy(LivingTrapInside, rarityIndoors.Value, (LevelTypes)(-1), (SpawnType)0, LivingTrapTerminalNode, LivingTrapTerminalKeyword);
			}
			object obj = <>c.<>9__11_0;
			if (obj == null)
			{
				hook_ShipHasLeft val = delegate(orig_ShipHasLeft orig, StartOfRound self)
				{
					try
					{
						foreach (GameObject trapObject in trapObjects)
						{
							if (Object.op_Implicit((Object)(object)trapObject))
							{
								Object.Destroy((Object)(object)trapObject);
							}
						}
					}
					catch (Exception ex)
					{
						Debug.Log((object)ex);
					}
					if (trapObjects != null)
					{
						trapObjects.Clear();
					}
					orig.Invoke(self);
				};
				<>c.<>9__11_0 = val;
				obj = (object)val;
			}
			StartOfRound.ShipHasLeft += (hook_ShipHasLeft)obj;
			Logger.LogInfo((object)"Plugin Living Traps is loaded!");
		}

		public static string ScaleAllIntegers(string input, float multiplier)
		{
			return Regex.Replace(input, "\\d+", delegate(Match match)
			{
				int num = int.Parse(match.Value);
				return ((int)Math.Round((float)num * multiplier)).ToString();
			});
		}

		public void bindVars()
		{
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Expected O, but got Unknown
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Expected O, but got Unknown
			//IL_011a: Expected O, but got Unknown
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Expected O, but got Unknown
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Expected O, but got Unknown
			//IL_0138: 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_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Expected O, but got Unknown
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Expected O, but got Unknown
			//IL_015e: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Expected O, but got Unknown
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Expected O, but got Unknown
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Expected O, but got Unknown
			//IL_018a: Expected O, but got Unknown
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Expected O, but got Unknown
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Expected O, but got Unknown
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Expected O, but got Unknown
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Expected O, but got Unknown
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Expected O, but got Unknown
			rarity = ((BaseUnityPlugin)this).Config.Bind<int>("Spawning", "Enemy Spawnrate Outdoors", 20, "Essentially the enemy 'rarity for spawning outside.' A higher value means a higher spawnrate.");
			rarityIndoors = ((BaseUnityPlugin)this).Config.Bind<int>("Spawning", "Enemy Spawnrate Indoors", 100, "Essentially the enemy 'rarity for spawning outside.' A higher value means a higher spawnrate.");
			spawnIndoors = ((BaseUnityPlugin)this).Config.Bind<bool>("Spawning", "Enemy Spawns Inside", true, "Makes the enemy capable of spawning indoors");
			spawnOutdoors = ((BaseUnityPlugin)this).Config.Bind<bool>("Spawning", "Enemy Spawns Outside", true, "Makes the enemy capable of spawning outdoors");
			moaiGlobalSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Modifiers", "Enemy Speed Multiplier", 1f, "Changes the speed of all living traps.");
			trapOptions = ((BaseUnityPlugin)this).Config.Bind<string>("Spawning", "Trap spawn options.", "TurretContainer,mine,spike,sand", "Comma separated list of trap spawns. If you enter a modded option, it must somewhat match the gameobject/prefab name (if you know what this means that is). for simplicity, you can try throwing in basic names to see if the mod picks it up. Even a small piece of the trap's name would work. NOTE: You can now have literally anything, trap or not, be alive!");
			groupSize = ((BaseUnityPlugin)this).Config.Bind<int>("Spawning", "Group Size Range", 1, "The max group spawn size for trap spawns. Traps will spawn in groups (3 spike traps, 3 mines, etc.) of 1 to this size.");
			ConfigEntry<float> obj = moaiGlobalSpeed;
			FloatSliderOptions val = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val).Min = 0f;
			((BaseRangeOptions<float>)val).Max = 5f;
			FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val);
			TextInputFieldConfigItem val3 = new TextInputFieldConfigItem(trapOptions, new TextInputFieldOptions
			{
				RequiresRestart = false
			});
			ConfigEntry<int> obj2 = rarity;
			IntInputFieldOptions val4 = new IntInputFieldOptions
			{
				RequiresRestart = true
			};
			((BaseRangeOptions<int>)val4).Min = 0;
			((BaseRangeOptions<int>)val4).Max = 1000000;
			IntInputFieldConfigItem val5 = new IntInputFieldConfigItem(obj2, val4);
			ConfigEntry<int> obj3 = rarityIndoors;
			IntInputFieldOptions val6 = new IntInputFieldOptions
			{
				RequiresRestart = true
			};
			((BaseRangeOptions<int>)val6).Min = 0;
			((BaseRangeOptions<int>)val6).Max = 1000000;
			IntInputFieldConfigItem val7 = new IntInputFieldConfigItem(obj3, val6);
			BoolCheckBoxConfigItem val8 = new BoolCheckBoxConfigItem(spawnIndoors, new BoolCheckBoxOptions
			{
				RequiresRestart = true
			});
			BoolCheckBoxConfigItem val9 = new BoolCheckBoxConfigItem(spawnOutdoors, new BoolCheckBoxOptions
			{
				RequiresRestart = true
			});
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val7);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val5);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val3);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val9);
		}
	}
}
namespace Living_Traps
{
	internal class LivingTrapAI : TRAPAICORE
	{
		private GameObject hostTrap;

		private float retryTime = 0f;

		public static GameObject quicksandPrefab;

		public NavMeshAgent AGENT_TRAP = null;

		public override void Start()
		{
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)"LivingTrap: Spawned in!");
			baseInit();
			GameObject val = null;
			int num = 15;
			string text = pickTrap();
			while (((Object)(object)val == (Object)null && num > 0) || (text.ToLower().Contains("sand") && !((EnemyAI)this).isOutside))
			{
				text = pickTrap();
				val = getTrap(text);
				num--;
			}
			if ((Object)(object)val == (Object)null)
			{
				Debug.LogError((object)"Trap prefab search failure. Could not spawn a living trap!");
				return;
			}
			if (((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				hostTrap = Object.Instantiate<GameObject>(val, ((Component)this).transform.position, ((Component)this).transform.rotation);
				AGENT_TRAP = hostTrap.GetComponent<NavMeshAgent>();
				if ((Object)(object)AGENT_TRAP != (Object)null && (AGENT_TRAP.updateRotation || AGENT_TRAP.updatePosition))
				{
					AGENT_TRAP.updateRotation = false;
					AGENT_TRAP.updatePosition = false;
				}
				if (Object.op_Implicit((Object)(object)hostTrap.GetComponent<NetworkObject>()))
				{
					hostTrap.GetComponent<NetworkObject>().Spawn(false);
				}
				else
				{
					initiateIndependentTrapClientRpc(text);
				}
				if (Object.op_Implicit((Object)(object)((NetworkBehaviour)this).NetworkObject))
				{
					((EnemyAI)this).thisNetworkObject = hostTrap.GetComponent<NetworkObject>();
				}
			}
			if (Object.op_Implicit((Object)(object)hostTrap))
			{
				Plugin.trapObjects.Add(hostTrap);
			}
			Plugin.trapObjects.Add(((Component)this).gameObject);
		}

		[ClientRpc]
		public void initiateIndependentTrapClientRpc(string targ)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Invalid comparison between Unknown and I4
			//IL_005f: 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_0088: 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_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1416629036u, val, (RpcDelivery)0);
				bool flag = targ != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(targ, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1416629036u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
				if (!((NetworkBehaviour)RoundManager.Instance).IsHost)
				{
					hostTrap = Object.Instantiate<GameObject>(getTrap(targ), ((Component)this).transform.position, ((Component)this).transform.rotation);
				}
			}
		}

		public override void Update()
		{
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)hostTrap) && ((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
			if (Object.op_Implicit((Object)(object)hostTrap))
			{
				AGENT_TRAP = hostTrap.GetComponent<NavMeshAgent>();
				if ((Object)(object)AGENT_TRAP != (Object)null && (AGENT_TRAP.updateRotation || AGENT_TRAP.updatePosition))
				{
					AGENT_TRAP.updateRotation = false;
					AGENT_TRAP.updatePosition = false;
				}
			}
			if (!Object.op_Implicit((Object)(object)hostTrap))
			{
				Debug.Log((object)"Living Trap: Host trap missing! Will not sync transform of trap!");
				if (!((NetworkBehaviour)RoundManager.Instance).IsHost)
				{
					requestTrapObjectServerRpc();
				}
				return;
			}
			((EnemyAI)this).Update();
			baseUpdate();
			if (Object.op_Implicit((Object)(object)hostTrap))
			{
				hostTrap.transform.position = ((Component)this).transform.position;
				hostTrap.transform.rotation = ((Component)this).transform.rotation;
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void requestTrapObjectServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2314795623u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2314795623u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
			if (Time.time > retryTime)
			{
				retryTime = Time.time + 0.2f;
				NetworkObject component = hostTrap.GetComponent<NetworkObject>();
				if (Object.op_Implicit((Object)(object)hostTrap) && Object.op_Implicit((Object)(object)component) && component.IsSpawned)
				{
					setTrapObjectClientRpc(component.NetworkObjectId);
				}
				else
				{
					Debug.Log((object)"Living Traps: Can't send trap information to clients, awaiting for net synchronization.");
				}
			}
		}

		[ClientRpc]
		public void setTrapObjectClientRpc(ulong uid)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2025391493u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, uid);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2025391493u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
			NetworkObject[] array = Object.FindObjectsOfType<NetworkObject>();
			NetworkObject[] array2 = array;
			foreach (NetworkObject val3 in array2)
			{
				if (val3.NetworkObjectId == uid)
				{
					hostTrap = ((Component)val3).gameObject;
				}
			}
		}

		public override void DoAIInterval()
		{
			if (!((EnemyAI)this).isEnemyDead)
			{
				((EnemyAI)this).DoAIInterval();
				baseAIInterval();
				((EnemyAI)this).agent.acceleration = 8f * Plugin.moaiGlobalSpeed.Value;
				switch (((EnemyAI)this).currentBehaviourStateIndex)
				{
				case 0:
					baseSearchingForPlayer();
					break;
				case 1:
					baseStickingInFrontOfPlayer();
					break;
				default:
					Debug.Log((object)"This Behavior State doesn't exist!");
					break;
				}
			}
		}

		public string pickTrap()
		{
			string text = "";
			text += Plugin.trapOptions.Value;
			if (!selectedType.Equals(""))
			{
				return selectedType;
			}
			string[] array = (from s in Plugin.trapOptions.Value.Split(",")
				select s.Trim()).ToArray();
			return selectedType = array[Plugin.rnd.Next(0, array.Length)];
		}

		public static GameObject FindQuicksandContainer()
		{
			GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>();
			GameObject[] array2 = array;
			foreach (GameObject val in array2)
			{
				if (((Object)val).name == "QuicksandContainer")
				{
					Debug.Log((object)$"✅ Found: {((Object)val).name} (activeInHierarchy: {val.activeInHierarchy}) in scene or prefab.");
					if ((Object)(object)val.GetComponentInChildren<DecalProjector>() != (Object)null)
					{
						return val;
					}
				}
			}
			Debug.LogWarning((object)"❌ Could not find any GameObject named 'QuicksandContainer'.");
			return null;
		}

		public static GameObject getTrap(string hazardName)
		{
			if (string.IsNullOrWhiteSpace(hazardName))
			{
				return null;
			}
			string text = hazardName.ToLower().Trim();
			if ("quicksand".Contains(text))
			{
				if (!Object.op_Implicit((Object)(object)quicksandPrefab))
				{
					quicksandPrefab = FindQuicksandContainer();
				}
				return quicksandPrefab;
			}
			SelectableLevel[] array = Resources.FindObjectsOfTypeAll<SelectableLevel>();
			SelectableLevel[] array2 = array;
			foreach (SelectableLevel val in array2)
			{
				if (val.spawnableMapObjects == null)
				{
					continue;
				}
				SpawnableMapObject[] spawnableMapObjects = val.spawnableMapObjects;
				foreach (SpawnableMapObject val2 in spawnableMapObjects)
				{
					if (((Object)val2.prefabToSpawn).name.ToLower().Contains(text))
					{
						return val2.prefabToSpawn;
					}
				}
			}
			GameObject[] array3 = Resources.FindObjectsOfTypeAll<GameObject>();
			GameObject result = null;
			int num = int.MaxValue;
			bool flag = false;
			GameObject[] array4 = array3;
			foreach (GameObject val3 in array4)
			{
				if (!((Object)(object)val3 == (Object)null))
				{
					string text2 = ((Object)val3).name?.ToLower() ?? string.Empty;
					int num2 = Levenshtein(text2, text);
					if (text2.Equals(text))
					{
						num2 -= 5;
					}
					else if (text2.StartsWith(text))
					{
						num2 -= 3;
					}
					else if (text2.Contains(text))
					{
						num2 -= 2;
					}
					bool flag2 = HasRenderable(val3);
					if (num2 < num)
					{
						result = val3;
						num = num2;
						flag = flag2;
					}
					else if (num2 == num && flag2 && !flag)
					{
						result = val3;
						flag = true;
					}
				}
			}
			return result;
		}

		private static bool HasRenderable(GameObject go)
		{
			if ((Object)(object)go.GetComponent<MeshRenderer>() != (Object)null && (Object)(object)go.GetComponent<MeshFilter>() != (Object)null)
			{
				return true;
			}
			if ((Object)(object)go.GetComponent<SkinnedMeshRenderer>() != (Object)null)
			{
				return true;
			}
			return false;
		}

		private static int Levenshtein(string s, string t)
		{
			if ((object)s == t)
			{
				return 0;
			}
			if (s.Length == 0)
			{
				return t.Length;
			}
			if (t.Length == 0)
			{
				return s.Length;
			}
			int length = s.Length;
			int length2 = t.Length;
			int[] array = new int[length2 + 1];
			int[] array2 = new int[length2 + 1];
			for (int i = 0; i <= length2; i++)
			{
				array[i] = i;
			}
			for (int j = 0; j < length; j++)
			{
				array2[0] = j + 1;
				char c = s[j];
				for (int k = 0; k < length2; k++)
				{
					int num = ((c != t[k]) ? 1 : 0);
					int num2 = array[k + 1] + 1;
					int num3 = array2[k] + 1;
					int num4 = array[k] + num;
					int num5 = ((num2 < num3) ? num2 : num3);
					array2[k + 1] = ((num5 < num4) ? num5 : num4);
				}
				int[] array3 = array;
				array = array2;
				array2 = array3;
			}
			return array[length2];
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		protected override void __initializeRpcs()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			((NetworkBehaviour)this).__registerRpc(1416629036u, new RpcReceiveHandler(__rpc_handler_1416629036), "initiateIndependentTrapClientRpc");
			((NetworkBehaviour)this).__registerRpc(2314795623u, new RpcReceiveHandler(__rpc_handler_2314795623), "requestTrapObjectServerRpc");
			((NetworkBehaviour)this).__registerRpc(2025391493u, new RpcReceiveHandler(__rpc_handler_2025391493), "setTrapObjectClientRpc");
			base.__initializeRpcs();
		}

		private static void __rpc_handler_1416629036(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: 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_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string targ = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref targ, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((LivingTrapAI)(object)target).initiateIndependentTrapClientRpc(targ);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2314795623(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((LivingTrapAI)(object)target).requestTrapObjectServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2025391493(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong trapObjectClientRpc = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref trapObjectClientRpc);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((LivingTrapAI)(object)target).setTrapObjectClientRpc(trapObjectClientRpc);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "LivingTrapAI";
		}
	}
}
namespace EasterIsland
{
	internal class ConfigModel
	{
		public static ConfigEntry<float> moaiGlobalSize;

		public static ConfigEntry<float> moaiGlobalMusicVol;

		public static ConfigEntry<float> moaiGlobalRarity;

		public static ConfigEntry<float> moaiGlobalSpeed;

		public static void setupConfig()
		{
			//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_0016: Expected O, but got Unknown
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_0028: Expected O, but got Unknown
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_0050: Expected O, but got Unknown
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//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_0066: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Expected O, but got Unknown
			//IL_0078: Expected O, but got Unknown
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Expected O, but got Unknown
			//IL_007e: 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: Expected O, but got Unknown
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Expected O, but got Unknown
			//IL_00a0: Expected O, but got Unknown
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			ConfigEntry<float> obj = moaiGlobalSize;
			FloatSliderOptions val = new FloatSliderOptions();
			((BaseRangeOptions<float>)val).Min = 0.05f;
			((BaseRangeOptions<float>)val).Max = 5f;
			FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val);
			ConfigEntry<float> obj2 = moaiGlobalMusicVol;
			FloatSliderOptions val3 = new FloatSliderOptions();
			((BaseRangeOptions<float>)val3).Min = 0f;
			((BaseRangeOptions<float>)val3).Max = 2f;
			FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3);
			ConfigEntry<float> obj3 = moaiGlobalRarity;
			FloatSliderOptions val5 = new FloatSliderOptions();
			((BaseRangeOptions<float>)val5).Min = 0f;
			((BaseRangeOptions<float>)val5).Max = 10f;
			FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5);
			ConfigEntry<float> obj4 = moaiGlobalSpeed;
			FloatSliderOptions val7 = new FloatSliderOptions();
			((BaseRangeOptions<float>)val7).Min = 0f;
			((BaseRangeOptions<float>)val7).Max = 5f;
			FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7);
		}
	}
}
namespace __GEN
{
	internal class NetworkVariableSerializationHelper
	{
		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeSerialization()
		{
		}
	}
}
namespace LivingTraps.NetcodePatcher
{
	[AttributeUsage(AttributeTargets.Module)]
	internal class NetcodePatchedAssemblyAttribute : Attribute
	{
	}
}