Decompiled source of CodeRebirth v0.8.11

plugins/CodeRebirth/CodeRebirth.dll

Decompiled 2 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
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 BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using CodeRebirth.NetcodePatcher;
using CodeRebirth.src.Content;
using CodeRebirth.src.Content.Enemies;
using CodeRebirth.src.Content.Items;
using CodeRebirth.src.Content.Maps;
using CodeRebirth.src.Content.Unlockables;
using CodeRebirth.src.Content.Weapons;
using CodeRebirth.src.Content.Weathers;
using CodeRebirth.src.MiscScripts;
using CodeRebirth.src.MiscScripts.CustomPasses;
using CodeRebirth.src.ModCompats;
using CodeRebirth.src.Patches;
using CodeRebirth.src.Util;
using CodeRebirth.src.Util.AssetLoading;
using CodeRebirth.src.Util.Extensions;
using CullFactory.Behaviours.API;
using DigitalRuby.ThunderAndLightning;
using GameNetcodeStuff;
using HarmonyLib;
using IL.GameNetcodeStuff;
using LethalCompanyInputUtils.Api;
using LethalLevelLoader;
using LethalLib.Extras;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using On;
using On.GameNetcodeStuff;
using OpenBodyCams;
using SubtitlesAPI;
using Unity.Mathematics;
using Unity.Netcode;
using Unity.Netcode.Components;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering.RendererUtils;
using UnityEngine.SceneManagement;
using UnityEngine.Serialization;
using UnityEngine.VFX;
using WeatherRegistry;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("WeatherRegistry")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("CodeRebirth")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Content mod that adds Custom Weathers, Items, Enemies and more.")]
[assembly: AssemblyFileVersion("0.8.11.0")]
[assembly: AssemblyInformationalVersion("0.8.11+26edebad8bb9900e1402349486073ca53212d9a2")]
[assembly: AssemblyProduct("CodeRebirth")]
[assembly: AssemblyTitle("CodeRebirth")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.8.11.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<NetworkTransformState>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedValueEquals<NetworkTransformState>();
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>();
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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 SeeThroughCustomPass : CustomPass
{
	[SerializeField]
	public Material seeThroughMaterial = new Material(CodeRebirthUtils.Instance.WireframeMaterial);

	public LayerMask seeThroughLayer;

	public float maxVisibilityDistance = 20f;

	[SerializeField]
	private readonly Shader stencilShader = CodeRebirthUtils.Instance.SeeThroughShader;

	private Material? stencilMaterial;

	private ShaderTagId[] shaderTags = Array.Empty<ShaderTagId>();

	protected override bool executeInSceneView => true;

	public void ConfigureMaterial(Color edgeColor, Color fillColor, float thickness)
	{
		//IL_000b: 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)
		seeThroughMaterial.SetColor("_EdgeColor", edgeColor);
		seeThroughMaterial.SetColor("_MainColor", fillColor);
		seeThroughMaterial.SetFloat("_WireframeVal", thickness);
	}

	protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd)
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: 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_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		stencilMaterial = CoreUtils.CreateEngineMaterial(stencilShader);
		shaderTags = (ShaderTagId[])(object)new ShaderTagId[4]
		{
			new ShaderTagId("Forward"),
			new ShaderTagId("ForwardOnly"),
			new ShaderTagId("SRPDefaultUnlit"),
			new ShaderTagId("FirstPass")
		};
	}

	protected override void Execute(CustomPassContext ctx)
	{
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: 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_0067: 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_0094: 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_009a: 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_00b8: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)stencilMaterial == (Object)null)
		{
			stencilMaterial = CoreUtils.CreateEngineMaterial(stencilShader);
		}
		stencilMaterial.SetInt("_StencilWriteMask", 64);
		seeThroughMaterial.SetFloat("_MaxVisibilityDistance", Mathf.Max(0f, maxVisibilityDistance));
		RenderObjects(ctx.renderContext, ctx.cmd, stencilMaterial, 0, (CompareFunction)4, ctx.cullingResults, ctx.hdCamera);
		StencilState value = default(StencilState);
		((StencilState)(ref value))..ctor(true, (byte)64, byte.MaxValue, (CompareFunction)3, (StencilOp)0, (StencilOp)0, (StencilOp)0);
		RenderObjects(ctx.renderContext, ctx.cmd, seeThroughMaterial, seeThroughMaterial.FindPass("ForwardOnly"), (CompareFunction)7, ctx.cullingResults, ctx.hdCamera, value);
	}

	public override IEnumerable<Material> RegisterMaterialForInspector()
	{
		yield return seeThroughMaterial;
	}

	private void RenderObjects(ScriptableRenderContext renderContext, CommandBuffer cmd, Material overrideMaterial, int passIndex, CompareFunction depthCompare, CullingResults cullingResult, HDCamera hdCamera, StencilState? overrideStencil = null)
	{
		//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_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: 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_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		RendererListDesc val = default(RendererListDesc);
		((RendererListDesc)(ref val))..ctor(shaderTags, cullingResult, hdCamera.camera);
		val.rendererConfiguration = (PerObjectData)0;
		val.renderQueueRange = RenderQueueRange.opaque;
		val.sortingCriteria = (SortingCriteria)4;
		val.excludeObjectMotionVectors = false;
		val.overrideMaterial = overrideMaterial;
		val.overrideMaterialPassIndex = passIndex;
		val.layerMask = LayerMask.op_Implicit(seeThroughLayer);
		RenderStateBlock value = default(RenderStateBlock);
		((RenderStateBlock)(ref value))..ctor((RenderStateMask)4);
		((RenderStateBlock)(ref value)).depthState = new DepthState(false, depthCompare);
		val.stateBlock = value;
		RendererListDesc val2 = val;
		if (overrideStencil.HasValue)
		{
			RenderStateBlock value2 = val2.stateBlock.Value;
			((RenderStateBlock)(ref value2)).mask = (RenderStateMask)(((RenderStateBlock)(ref value2)).mask | 8);
			((RenderStateBlock)(ref value2)).stencilState = overrideStencil.Value;
			val2.stateBlock = value2;
		}
		CoreUtils.DrawRendererList(renderContext, cmd, ((ScriptableRenderContext)(ref renderContext)).CreateRendererList(val2));
	}

	protected override void Cleanup()
	{
	}
}
[ExecuteInEditMode]
public class ItemGrabEditor : MonoBehaviour
{
	public Transform parentObject;

	public Transform item;

	public bool previewGrab;

	public Vector3 additionalRotation;

	public Vector3 positionOffset;

	public AnimationClip previewAnimation;

	public Animator animator;

	public string targetTransformName = "LocalItemHolder";

	private void Start()
	{
		animator = ((Component)this).GetComponent<Animator>();
		if ((Object)(object)animator == (Object)null)
		{
			Debug.LogError((object)("Animator not found on object: " + ((Object)((Component)this).gameObject).name));
		}
		if ((Object)(object)parentObject == (Object)null)
		{
			SetParentTransformByName(targetTransformName);
		}
	}

	private void Update()
	{
		UpdateItemTransform();
	}

	private void OnValidate()
	{
		UpdateItemTransform();
	}

	public void UpdateItemTransform()
	{
		//IL_002a: 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_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: 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_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		if (previewGrab && (Object)(object)parentObject != (Object)null && (Object)(object)item != (Object)null)
		{
			Vector3 position = parentObject.position + parentObject.TransformDirection(positionOffset);
			Quaternion rotation = parentObject.rotation * Quaternion.Euler(additionalRotation);
			item.position = position;
			item.rotation = rotation;
		}
	}

	public void SetParentTransformByName(string targetName)
	{
		Transform transform = ((Component)this).transform;
		Transform val = FindTransformByName(transform, targetName);
		if ((Object)(object)val != (Object)null)
		{
			parentObject = val;
			Debug.Log((object)("Transform found: " + ((Object)val).name));
		}
		else
		{
			Debug.Log((object)"Transform not found.");
		}
	}

	public static Transform FindTransformByName(Transform parent, string targetName)
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Expected O, but got Unknown
		if ((Object)(object)parent == (Object)null)
		{
			return null;
		}
		if (((Object)parent).name.Equals(targetName))
		{
			return parent;
		}
		foreach (Transform item in parent)
		{
			Transform parent2 = item;
			Transform val = FindTransformByName(parent2, targetName);
			if ((Object)(object)val != (Object)null)
			{
				return val;
			}
		}
		return null;
	}

	public void ApplyDefaultRotation()
	{
		//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)
		if ((Object)(object)item != (Object)null)
		{
			GrabbableObject component = ((Component)item).gameObject.GetComponent<GrabbableObject>();
			if ((Object)(object)component != (Object)null)
			{
				additionalRotation = component.itemProperties.rotationOffset;
			}
		}
	}

	public void FindFirstGrabbableObjectInScene()
	{
		GrabbableObject val = Object.FindObjectOfType<GrabbableObject>();
		if ((Object)(object)val != (Object)null)
		{
			item = ((Component)val).transform;
			Debug.Log((object)("GrabbableObject found: " + ((Object)item).name));
		}
		else
		{
			Debug.Log((object)"No GrabbableObject found in the scene.");
		}
	}

	public void ApplyDefaultPositionOffset()
	{
		//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)
		if ((Object)(object)item != (Object)null)
		{
			GrabbableObject component = ((Component)item).gameObject.GetComponent<GrabbableObject>();
			if ((Object)(object)component != (Object)null)
			{
				positionOffset = component.itemProperties.positionOffset;
			}
		}
	}
}
namespace CodeRebirth
{
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "CodeRebirth";

		public const string PLUGIN_NAME = "CodeRebirth";

		public const string PLUGIN_VERSION = "0.8.11";
	}
}
namespace CodeRebirth.Util.Extensions
{
	internal static class ObjectExtensions
	{
		public static string ToStringWithDefault(this object it, string defaultString = "null")
		{
			return it.ToString().OrIfEmpty(defaultString);
		}
	}
	internal static class StringExtensions
	{
		public static string OrIfEmpty(this string? self, string defaultValue)
		{
			if (string.IsNullOrEmpty(self))
			{
				return defaultValue;
			}
			return self;
		}
	}
}
namespace CodeRebirth.src
{
	public class CodeRebirthConfig
	{
		public ConfigEntry<bool> ConfigRemoveInteriorFog { get; private set; }

		public ConfigEntry<bool> ConfigDontTargetFarEnemies { get; private set; }

		public ConfigEntry<bool> ConfigHazardsDeleteBodies { get; private set; }

		public ConfigEntry<bool> ConfigOnlyOwnerDisablesGal { get; private set; }

		public ConfigEntry<bool> ConfigPjonkTurkeyEnabled { get; private set; }

		public ConfigEntry<bool> ConfigShockwaveGalPlayerModelEnabled { get; private set; }

		public ConfigEntry<bool> ConfigSeamineTinkPlayerModelEnabled { get; private set; }

		public ConfigEntry<bool> ConfigFirstLaunchPopup { get; private set; }

		public ConfigEntry<bool> ConfigFunctionalMicrowaveEnabled { get; private set; }

		public ConfigEntry<bool> ConfigInsideBearTrapEnabled { get; private set; }

		public ConfigEntry<bool> ConfigBearTrapEnabled { get; private set; }

		public ConfigEntry<bool> ConfigLaserTurretEnabled { get; private set; }

		public ConfigEntry<bool> ConfigFlashTurretEnabled { get; private set; }

		public ConfigEntry<bool> ConfigIndustrialFanEnabled { get; private set; }

		public ConfigEntry<bool> ConfigTeslaShockEnabled { get; private set; }

		public ConfigEntry<bool> ConfigAirControlUnitEnabled { get; private set; }

		public ConfigEntry<bool> ConfigSeamineTinkEnabled { get; private set; }

		public ConfigEntry<bool> ConfigShockwaveBotEnabled { get; private set; }

		public ConfigEntry<bool> ConfigDangerousFloraEnabled { get; private set; }

		public ConfigEntry<bool> ConfigFarmingEnabled { get; private set; }

		public ConfigEntry<bool> ConfigBiomesEnabled { get; private set; }

		public ConfigEntry<bool> ConfigFloraEnabled { get; private set; }

		public ConfigEntry<bool> ConfigRedwoodHeartEnabled { get; private set; }

		public ConfigEntry<bool> ConfigRedwoodEnabled { get; private set; }

		public ConfigEntry<bool> ConfigSnowGlobeMusic { get; private set; }

		public ConfigEntry<bool> ConfigAllowCrits { get; private set; }

		public ConfigEntry<bool> ConfigHoverboardEnabled { get; private set; }

		public ConfigEntry<bool> ConfigMeteorShowerEnabled { get; private set; }

		public ConfigEntry<bool> ConfigTornadosEnabled { get; private set; }

		public ConfigEntry<bool> ConfigWalletEnabled { get; private set; }

		public ConfigEntry<bool> ConfigEpicAxeScrapEnabled { get; private set; }

		public ConfigEntry<bool> ConfigCutieFlyEnabled { get; private set; }

		public ConfigEntry<bool> ConfigSnailCatEnabled { get; private set; }

		public ConfigEntry<bool> ConfigItemCrateEnabled { get; private set; }

		public ConfigEntry<bool> ConfigSnowGlobeEnabled { get; private set; }

		public ConfigEntry<bool> ConfigMoneyEnabled { get; private set; }

		public ConfigEntry<bool> ConfigNaturesMaceScrapEnabled { get; private set; }

		public ConfigEntry<bool> ConfigIcyHammerScrapEnabled { get; private set; }

		public ConfigEntry<bool> ConfigSpikyMaceScrapEnabled { get; private set; }

		public ConfigEntry<string> ConfigWoodenSeedSpawnWeights { get; private set; }

		public ConfigEntry<float> ConfigBiomesSpawnChance { get; private set; }

		public ConfigEntry<string> ConfigCarnivorousSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigNaturesMaceScrapSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigIcyHammerScrapSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigSpikyMaceScrapSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigRedwoodSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigSnailCatSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigCutieFlySpawnWeights { get; private set; }

		public ConfigEntry<int> ConfigMoneyAbundance { get; private set; }

		public ConfigEntry<string> ConfigEpicAxeScrapSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigBearTrapSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigMetalCrateSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigWoodenCrateSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigLaserTurretCurveSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigSnowGlobeSpawnWeights { get; private set; }

		public ConfigEntry<string> ConfigFlashTurretCurveSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigIndustrialFanCurveSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigTeslaShockCurveSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigAirControlUnitSpawnWeight { get; private set; }

		public ConfigEntry<string> ConfigFunctionalMicrowaveCurveSpawnWeight { get; private set; }

		public ConfigEntry<float> ConfigCarnivorousPowerLevel { get; private set; }

		public ConfigEntry<int> ConfigCarnivorousMaxSpawnCount { get; private set; }

		public ConfigEntry<float> ConfigRedwoodNormalVolume { get; private set; }

		public ConfigEntry<float> ConfigRedwoodPowerLevel { get; private set; }

		public ConfigEntry<int> ConfigRedwoodMaxSpawnCount { get; private set; }

		public ConfigEntry<float> ConfigRedwoodInShipVolume { get; private set; }

		public ConfigEntry<float> ConfigRedwoodSpeed { get; private set; }

		public ConfigEntry<float> ConfigRedwoodShipPadding { get; private set; }

		public ConfigEntry<float> ConfigRedwoodEyesight { get; private set; }

		public ConfigEntry<bool> ConfigRedwoodCanEatOldBirds { get; private set; }

		public ConfigEntry<float> ConfigCutieFlyFlapWingVolume { get; private set; }

		public ConfigEntry<int> ConfigCutieFlyMaxSpawnCount { get; private set; }

		public ConfigEntry<int> ConfigSnailCatMaxSpawnCount { get; private set; }

		public ConfigEntry<float> ConfigCutieFlyPowerLevel { get; private set; }

		public ConfigEntry<float> ConfigSnailCatPowerLevel { get; private set; }

		public ConfigEntry<float> ConfigMeteorShowerTimeToLeave { get; private set; }

		public ConfigEntry<float> ConfigTornadoInsideBeforeThrow { get; private set; }

		public ConfigEntry<float> ConfigTornadoPullStrength { get; private set; }

		public ConfigEntry<bool> ConfigTornadoYeetSFX { get; private set; }

		public ConfigEntry<string> ConfigTornadoCanFlyYouAwayWeatherTypes { get; private set; }

		public ConfigEntry<float> ConfigTornadoSpeed { get; private set; }

		public ConfigEntry<float> ConfigMeteorSpeed { get; private set; }

		public ConfigEntry<int> ConfigMinMeteorSpawnCount { get; private set; }

		public ConfigEntry<int> ConfigMaxMeteorSpawnCount { get; private set; }

		public ConfigEntry<string> ConfigTornadoMoonWeatherTypes { get; private set; }

		public ConfigEntry<float> ConfigTornadoInShipVolume { get; private set; }

		public ConfigEntry<float> ConfigTornadoDefaultVolume { get; private set; }

		public ConfigEntry<float> ConfigMeteorShowerMeteoriteSpawnChance { get; private set; }

		public ConfigEntry<float> ConfigMeteorShowerInShipVolume { get; private set; }

		public ConfigEntry<bool> ConfigMeteorHitShip { get; private set; }

		public ConfigEntry<float> ConfigMeteorsDefaultVolume { get; private set; }

		public ConfigEntry<int> ConfigSeamineTinkCharges { get; private set; }

		public ConfigEntry<float> ConfigWoodenSeedTreeSpawnChance { get; private set; }

		public ConfigEntry<bool> ConfigWoodenCrateIsWhitelist { get; private set; }

		public ConfigEntry<float> ConfigMetalCrateValueMultiplier { get; private set; }

		public ConfigEntry<bool> ConfigGalBypassQuota { get; private set; }

		public ConfigEntry<bool> ConfigShockwaveBotAutomatic { get; private set; }

		public ConfigEntry<float> ConfigShockwaveBotPropellerVolume { get; private set; }

		public ConfigEntry<bool> ConfigShockwaveHoldsFourItems { get; private set; }

		public ConfigEntry<int> ConfigPlantPotPrice { get; private set; }

		public ConfigEntry<int> ConfigShockwaveCharges { get; private set; }

		public ConfigEntry<string> ConfigShockwaveBotEnemyBlacklist { get; private set; }

		public ConfigEntry<int> ConfigWoodenCrateHealth { get; private set; }

		public ConfigEntry<float> ConfigMetalHoldTimer { get; private set; }

		public ConfigEntry<int> ConfigCrateNumberToSpawn { get; private set; }

		public ConfigEntry<string> ConfigWoodenCratesBlacklist { get; private set; }

		public ConfigEntry<string> ConfigMetalCratesBlacklist { get; private set; }

		public ConfigEntry<bool> ConfigShovelCratesOnly { get; private set; }

		public ConfigEntry<int> ConfigSeamineTinkCost { get; private set; }

		public ConfigEntry<int> ConfigShockwaveBotCost { get; private set; }

		public ConfigEntry<bool> ConfigCanBreakTrees { get; private set; }

		public ConfigEntry<bool> ConfigAllowPowerLevelChangesFromWeather { get; private set; }

		public ConfigEntry<bool> ConfigEnableExtendedLogging { get; private set; }

		public ConfigEntry<string> ConfigFloraExcludeSpawnPlaces { get; private set; }

		public ConfigEntry<int> ConfigFloraMaxAbundance { get; private set; }

		public ConfigEntry<int> ConfigFloraMinAbundance { get; private set; }

		public ConfigEntry<string> ConfigFloraGrassSpawnPlaces { get; private set; }

		public ConfigEntry<string> ConfigFloraDesertSpawnPlaces { get; private set; }

		public ConfigEntry<string> ConfigFloraSnowSpawnPlaces { get; private set; }

		public ConfigEntry<float> ConfigCritChance { get; private set; }

		public ConfigEntry<bool> ConfigWalletMode { get; private set; }

		public ConfigEntry<int> ConfigHoverboardCost { get; private set; }

		public ConfigEntry<int> ConfigWalletCost { get; private set; }

		public ConfigEntry<int> ConfigMinCoinValue { get; private set; }

		public ConfigEntry<int> ConfigMaxCoinValue { get; private set; }

		public ConfigEntry<string> ConfigSeamineTinkEnemyBlacklist { get; private set; }

		public ConfigEntry<float> ConfigSeamineTinkRidingBruceVolume { get; private set; }

		public ConfigEntry<bool> ConfigSeamineTinkAutomatic { get; private set; }

		public ConfigEntry<float> ConfigMicrowaveVolume { get; private set; }

		public ConfigEntry<float> ConfigBearTrapVolume { get; private set; }

		public ConfigEntry<float> ConfigLaserTurretVolume { get; private set; }

		public ConfigEntry<float> ConfigFlashTurretVolume { get; private set; }

		public ConfigEntry<float> ConfigIndustrialFanVolume { get; private set; }

		public ConfigEntry<float> ConfigTeslaShockVolume { get; private set; }

		public ConfigEntry<float> ConfigACUVolume { get; private set; }

		public ConfigEntry<string> ConfigTomatoValue { get; private set; }

		public ConfigEntry<string> ConfigGoldenTomatoValue { get; private set; }

		public ConfigEntry<string> ConfigNaturesMaceWorth { get; private set; }

		public ConfigEntry<string> ConfigIcyHammerWorth { get; private set; }

		public ConfigEntry<string> ConfigSpikyMaceWorth { get; private set; }

		public ConfigEntry<string> ConfigEpicAxeWorth { get; private set; }

		public ConfigEntry<string> ConfigSnowGlobeWorth { get; private set; }

		public ConfigEntry<string> ConfigSapphireWorth { get; private set; }

		public ConfigEntry<string> ConfigRubyWorth { get; private set; }

		public ConfigEntry<string> ConfigEmeraldWorth { get; private set; }

		public ConfigEntry<bool> ConfigDebugMode { get; private set; }

		public CodeRebirthConfig(ConfigFile configFile)
		{
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Expected O, but got Unknown
			//IL_0535: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Expected O, but got Unknown
			//IL_0848: Unknown result type (might be due to invalid IL or missing references)
			//IL_0852: Expected O, but got Unknown
			//IL_0881: Unknown result type (might be due to invalid IL or missing references)
			//IL_088b: Expected O, but got Unknown
			//IL_08ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c4: Expected O, but got Unknown
			//IL_08f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fd: Expected O, but got Unknown
			//IL_092c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0936: Expected O, but got Unknown
			//IL_09b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c3: Expected O, but got Unknown
			//IL_0b73: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b7d: Expected O, but got Unknown
			//IL_0bac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb6: Expected O, but got Unknown
			//IL_0be5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bef: Expected O, but got Unknown
			//IL_0c3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c48: Expected O, but got Unknown
			//IL_0c93: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9d: Expected O, but got Unknown
			//IL_0ccc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd6: Expected O, but got Unknown
			//IL_0d21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2b: Expected O, but got Unknown
			//IL_0d6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d78: Expected O, but got Unknown
			//IL_0d9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da9: Expected O, but got Unknown
			//IL_0dd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de2: Expected O, but got Unknown
			//IL_0e11: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e1b: Expected O, but got Unknown
			//IL_0e66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e70: Expected O, but got Unknown
			//IL_0e9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea9: Expected O, but got Unknown
			//IL_0ed8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee2: Expected O, but got Unknown
			//IL_1021: Unknown result type (might be due to invalid IL or missing references)
			//IL_102b: Expected O, but got Unknown
			configFile.SaveOnConfigSet = false;
			ConfigDebugMode = configFile.Bind<bool>("Debug Options", "Debug Mode | Hazard Spawning Enabled", false, "Whether debug mode is enabled (for hazard spawning stuff).");
			ConfigEnableExtendedLogging = configFile.Bind<bool>("Debug Options", "Debug Mode | Enable Extended Logging", false, "Whether extended logging is enabled.");
			ConfigRemoveInteriorFog = configFile.Bind<bool>("Debug Options", "Debug Mode | Remove Interior Fog", true, "Whether zeekerss' horrible interior fog is removed.");
			ConfigFunctionalMicrowaveEnabled = configFile.Bind<bool>("FunctionalMicrowave Options", "Functional Microwave | Enabled", true, "Whether the Functional Microwave is enabled.");
			ConfigFunctionalMicrowaveCurveSpawnWeight = configFile.Bind<string>("FunctionalMicrowave Options", "Functional Microwave | SpawnWeight Curve", "Vanilla - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8 | Custom - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8", "The MoonName - CurveSpawnWeight for the hazard.");
			ConfigMicrowaveVolume = configFile.Bind<float>("FunctionalMicrowave Options", "Functional Microwave | Volume", 1f, "The volume of the Functional Microwave.");
			ConfigBearTrapEnabled = configFile.Bind<bool>("BearTrap Options", "Bear Trap | Enabled", true, "Whether the bear trap is enabled.");
			ConfigInsideBearTrapEnabled = configFile.Bind<bool>("BearTrap Options", "Bear Trap | Interior Spawn", false, "Whether the bear traps can spawn in the interior.");
			ConfigBearTrapSpawnWeight = configFile.Bind<string>("BearTrap Options", "Bear Trap | Spawn Abundance", "Vanilla:10,Custom:10", "The MoonName:Number Spawn Abundance (where it will spawn between 0 and 10) of bear trap clusters to spawn per round (clusters means that theres 1 primary bear trap that spawns more (0 to 5) around it).");
			ConfigBearTrapVolume = configFile.Bind<float>("BearTrap Options", "Bear Trap | Volume", 1f, "The volume of the Bear Trap.");
			ConfigLaserTurretEnabled = configFile.Bind<bool>("LaserTurret Options", "Laser Turret | Enabled", true, "Whether the Laser Turret is enabled.");
			ConfigLaserTurretCurveSpawnWeight = configFile.Bind<string>("LaserTurret Options", "Laser Turret | SpawnWeight Curve", "Vanilla - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8 | Custom - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8", "The MoonName - CurveSpawnWeight for the LaserTurret.");
			ConfigLaserTurretVolume = configFile.Bind<float>("LaserTurret Options", "Laser Turret | Volume", 1f, "The volume of the Laser Turret.");
			ConfigFlashTurretEnabled = configFile.Bind<bool>("FlashTurret Options", "Flash Turret | Enabled", true, "Whether the flash turret is enabled.");
			ConfigFlashTurretCurveSpawnWeight = configFile.Bind<string>("FlashTurret Options", "Flash Turret | SpawnWeight Curve", "Vanilla - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8 | Custom - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8 ", "The MoonName - CurveSpawnWeight for the FlashTurret.");
			ConfigFlashTurretVolume = configFile.Bind<float>("FlashTurret Options", "Flash Turret | Volume", 1f, "The volume of the Flash Turret.");
			ConfigIndustrialFanEnabled = configFile.Bind<bool>("IndustrialFan Options", "Industrial Fan | Enabled", true, "Whether the industrial fan is enabled.");
			ConfigIndustrialFanCurveSpawnWeight = configFile.Bind<string>("IndustrialFan Options", "Industrial Fan | SpawnWeight Curve", "Vanilla - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8 | Custom - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8", "The MoonName - CurveSpawnWeight for the IndustrialFan.");
			ConfigIndustrialFanVolume = configFile.Bind<float>("IndustrialFan Options", "Industrial Fan | Volume", 1f, "The volume of the Industrial Fan.");
			ConfigTeslaShockEnabled = configFile.Bind<bool>("TeslaShock Options", "Tesla Shock | Enabled", true, "Whether the tesla shock is enabled.");
			ConfigTeslaShockCurveSpawnWeight = configFile.Bind<string>("TeslaShock Options", "Tesla Shock | SpawnWeight Curve", "Vanilla - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8 | Custom - 0,0 ; 0.5,1 ; 0.8,3 ; 1,8", "The MoonName - CurveSpawnWeight for the TeslaShock.");
			ConfigTeslaShockVolume = configFile.Bind<float>("TeslaShock Options", "Tesla Shock | Volume", 1f, "The volume of the Tesla Shock.");
			ConfigAirControlUnitEnabled = configFile.Bind<bool>("AirControlUnit Options", "Air Control Unit | Enabled", true, "Whether the air control unit is enabled.");
			ConfigAirControlUnitSpawnWeight = configFile.Bind<string>("AirControlUnit Options", "Air Control Unit | SpawnWeight", "Vanilla:2,Custom:2,Titan:0,Olympus:2", "The MoonName:CurveSpawnWeight for the AirControlUnit.");
			ConfigACUVolume = configFile.Bind<float>("AirControlUnit Options", "Air Control Unit | Volume", 1f, "The volume of the Air Control Unit.");
			ConfigAllowPowerLevelChangesFromWeather = configFile.Bind<bool>("General", "Allow Power Level Changes From Weather", true, "Whether power level changes from CodeRebirth weathers are allowed.");
			ConfigOnlyOwnerDisablesGal = configFile.Bind<bool>("General", "Gal AI | Owner Power", false, "Whether only the current owner of the gal can disable her.");
			ConfigDontTargetFarEnemies = configFile.Bind<bool>("General", "Gal AI | Dont Stray Too Far", false, "Whether the Gal AI should stop targetting enemies when she is far from her owner's position.");
			ConfigHazardsDeleteBodies = configFile.Bind<bool>("General", "Hazards | Delete Bodies", true, "Whether hazards like IndustrialFan and LaserTurret should delete player bodies.");
			ConfigShockwaveBotEnabled = configFile.Bind<bool>("Shockwave Options", "Shockwave Gal | Enabled", true, "Whether the Shockwave Gal is enabled.");
			ConfigShockwaveBotCost = configFile.Bind<int>("Shockwave Options", "Shockwave Gal | Cost", 999, "Cost of the Shockwave Gal.");
			ConfigShockwaveCharges = configFile.Bind<int>("Shockwave Options", "Shockwave Gal | Charges", 10, "How many charges the Shockwave Gal has.");
			ConfigShockwaveHoldsFourItems = configFile.Bind<bool>("Shockwave Options", "Shockwave Gal | Holds Four Items", false, "Whether the Shockwave Gal holds four items regardless of singleplayer or multiplayer.");
			ConfigShockwaveBotEnemyBlacklist = configFile.Bind<string>("Shockwave Options", "Shockwave Gal | Enemy Blacklist", "Centipede, Red Locust Bees, Docile Locust Bees, Manticoil, CutieFly, SnailCat, Tornado, RadMech, Earth Leviathan, Puffer, Jester, Blob, Girl, Spring, Clay Surgeon", "Comma separated list of enemies that the Shockwave Gal will not target (immortal enemies should be counted by default, just not in config).");
			ConfigShockwaveBotPropellerVolume = configFile.Bind<float>("Shockwave Options", "Shockwave Gal | Propeller Volume", 0.75f, new ConfigDescription("Volume of the Shockwave Gal's propeller.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigShockwaveBotAutomatic = configFile.Bind<bool>("Shockwave Options", "Shockwave Gal | Automatic Behaviour", false, "Whether the Shockwave Gal will automatically wake up and choose the nearest player as the owner.");
			ConfigGalBypassQuota = configFile.Bind<bool>("Shockwave Options", "Shockwave Gal | Bypass Quota", false, "Whether the Shockwave Gal will bypass quota when using her sell function at company.");
			ConfigShockwaveGalPlayerModelEnabled = configFile.Bind<bool>("Shockwave Options", "Shockwave Gal | Player Model", true, "Whether the Shockwave Gal player model version is available for use (Requires MoreSuits and ModelReplacementAPI to be installed).");
			ConfigSeamineTinkEnabled = configFile.Bind<bool>("Seamine Options", "Seamine Gal | Enabled", true, "Whether the Seamine Gal is enabled.");
			ConfigSeamineTinkCost = configFile.Bind<int>("Seamine Options", "Seamine Gal | Cost", 999, "Cost of the Seamine Gal.");
			ConfigSeamineTinkCharges = configFile.Bind<int>("Seamine Options", "Seamine Gal | Charges", 3, "How many charges the Seamine Gal has.");
			ConfigSeamineTinkEnemyBlacklist = configFile.Bind<string>("Seamine Options", "Seamine Gal | Enemy Blacklist", "Docile Locust Bees, Manticoil, Nemo, Horse, CutieFly, Shisha, Tornado, Scary", "Comma separated list of enemies that the Seamine Gal will not target (keep in mind she targets ALL enemies).");
			ConfigSeamineTinkRidingBruceVolume = configFile.Bind<float>("Seamine Options", "Seamine Gal | Riding Bruce Volume", 0.75f, new ConfigDescription("Volume of the Seamine Gal's Riding Bruce.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigSeamineTinkAutomatic = configFile.Bind<bool>("Seamine Options", "Seamine Gal | Automatic Behaviour", false, "Whether the Seamine Gal will automatically wake up and choose the nearest player as the owner.");
			ConfigSeamineTinkPlayerModelEnabled = configFile.Bind<bool>("Seamine Options", "Seamine Gal | Player Model", true, "Whether the Seamine Gal player model version is available for use (Requires MoreSuits and ModelReplacementAPI to be installed).");
			ConfigBiomesEnabled = configFile.Bind<bool>("Biome Options", "Biomes | Enabled", false, "Whether Biomes are enabled.");
			ConfigBiomesSpawnChance = configFile.Bind<float>("Biome Options", "Biomes | Spawn Chance", 0.5f, "Biomes spawn chance.");
			ConfigDangerousFloraEnabled = configFile.Bind<bool>("Flora Options", "Dangerous Flora | Enabled", true, "Whether dangerous Flora is enabled.");
			ConfigCarnivorousSpawnWeights = configFile.Bind<string>("Flora Options", "Dangerous Flora | Carnivorous Spawn Weights", "Custom:20,Vanilla:20", "Carnivorous Plant spawn weights e.g. `Custom:20,Vanilla:20`.");
			ConfigCarnivorousPowerLevel = configFile.Bind<float>("Flora Options", "Dangerous Flora | Carnivorous Power Levels", 0.5f, "Carnivorous Plant power level.");
			ConfigCarnivorousMaxSpawnCount = configFile.Bind<int>("Flora Options", "Dangerous Flora | Carnivorous Max Count", 6, "Carnivorous Plant max count.");
			ConfigFloraEnabled = configFile.Bind<bool>("Flora Options", "Flora | Enabled", true, "Whether Flora is enabled.");
			ConfigFloraMaxAbundance = configFile.Bind<int>("Flora Options", "Flora | Max Abundance", 60, "How many plants can get added at most.");
			ConfigFloraMinAbundance = configFile.Bind<int>("Flora Options", "Flora | Min Abundance", 30, "How many plants can get added at least.");
			ConfigFloraGrassSpawnPlaces = configFile.Bind<string>("Flora Options", "Flora | Grass Spawn Places", "Vanilla,Custom,", "Flora spawn places e.g. `Custom,Vanilla,Experimentation,Assurance,Gloom`.");
			ConfigFloraDesertSpawnPlaces = configFile.Bind<string>("Flora Options", "Flora | Desert Spawn Places", "Vanilla,Custom,", "Flora spawn places e.g. `Custom,Vanilla,Experimentation,Assurance,Gloom`.");
			ConfigFloraSnowSpawnPlaces = configFile.Bind<string>("Flora Options", "Flora | Snow Spawn Places", "Vanilla,Custom,", "Flora spawn places e.g. `Custom,Vanilla,Experimentation,Assurance,Gloom`.");
			ConfigFloraExcludeSpawnPlaces = configFile.Bind<string>("Flora Options", "Flora | Exclude Spawn Places", "Infernis", "Flora EXLUDE spawn places e.g. `Experimentation,Assurance,Gloom` (only takes moon names).");
			ConfigFarmingEnabled = configFile.Bind<bool>("Farming Options", "Farming | Enabled", true, "Whether Farming is enabled.");
			ConfigPlantPotPrice = configFile.Bind<int>("Farming Options", "Farming | Plant Pot Price", 696, "Price of the Plant Pot.");
			ConfigWoodenSeedTreeSpawnChance = configFile.Bind<float>("Farming Options", "Farming | Wooden Seed Tree Spawn Chance", 2f, "Chance of the wooden seed to spawn from a broken tree");
			ConfigWoodenSeedSpawnWeights = configFile.Bind<string>("Farming Options", "Farming | Wooden Seed Spawn Weights", "", "Weights of the Wooden Seed spawn moons e.g. `Custom:10,Vanilla:10,Experimentation:50,Assurance:30,Gloom:20` (recommended empty).");
			ConfigTomatoValue = configFile.Bind<string>("Farming Options", "Farming | Tomato Value", "-1,-1", "Min,Max value of the Tomato, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigGoldenTomatoValue = configFile.Bind<string>("Farming Options", "Farming | Golden Tomato Value", "-1,-1", "Min,Max value of the Golden Tomato, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigTornadosEnabled = configFile.Bind<bool>("Tornado Options", "Tornados | Enabled", true, "Enables/Disables the Tornados from popping up into moons.");
			ConfigTornadoMoonWeatherTypes = configFile.Bind<string>("Tornado Options", "Tornados | Moon Types", "Smoky: All, | Fire: All, | Water: All, | Electric: All, | Windy: All, | Blood: All, |", "Moons that the fire type can pop into (All, or specify per moon type like so: Experimentation,Artifice,etc).");
			ConfigTornadoCanFlyYouAwayWeatherTypes = configFile.Bind<string>("Tornado Options", "Tornado | Can Fly You Away Weather Types", "All", "Tornado weather types that can fly you away (All, or specify per weather type like so: Fire,Electric,etc except water!!).");
			ConfigTornadoSpeed = configFile.Bind<float>("Tornado Options", "Tornados | Speed", 7f, new ConfigDescription("Speed of tornados.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			ConfigTornadoPullStrength = configFile.Bind<float>("Tornado Options", "Tornados | Pull Strength", 20f, new ConfigDescription("Pull strength of tornados.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			ConfigTornadoInsideBeforeThrow = configFile.Bind<float>("Tornado Options", "Tornados | Inside Before Throw", 10f, new ConfigDescription("Timer of being inside tornado before you get flung the hell out (50 if you never wanna be thrown).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 50f), Array.Empty<object>()));
			ConfigTornadoDefaultVolume = configFile.Bind<float>("Tornado Options", "Tornados | Default Volume", 1f, new ConfigDescription("Default volume of tornados.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigTornadoInShipVolume = configFile.Bind<float>("Tornado Options", "Tornados | Volume in Ship", 1f, new ConfigDescription("Volume of tornados in the ship.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigTornadoYeetSFX = configFile.Bind<bool>("Tornado Options", "Tornados | Yeet SFX", false, "Tornado Yeet SFX");
			ConfigCanBreakTrees = configFile.Bind<bool>("Weapon Options", "Weapons | Can Break Trees", true, "Enables/Disables breaking trees in the game for code rebirth weapons.");
			ConfigAllowCrits = configFile.Bind<bool>("Weapon Options", "Weapons | Crits", true, "Enables/Disables crits in the game for code rebirth weapons.");
			ConfigCritChance = configFile.Bind<float>("Weapon Options", "Weapons | Crit Chance", 25f, new ConfigDescription("Chance of crits in the game for code rebirth weapons.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			ConfigNaturesMaceScrapEnabled = configFile.Bind<bool>("NatureMace Options", "Natures Mace | Scrap Enabled", true, "Whether Natures Mace scrap is enabled.");
			ConfigNaturesMaceWorth = configFile.Bind<string>("NatureMace Options", "Natures Mace | Worth", "-1,-1", "Min and Max value of the NaturesMace, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigNaturesMaceScrapSpawnWeights = configFile.Bind<string>("NatureMace Options", "Natures Mace | Scrap Spawn Weights", "Custom:15,Vanilla:15", "Natures Mace scrap spawn weights.");
			ConfigIcyHammerScrapEnabled = configFile.Bind<bool>("Icy Hammer Options", "Icy Hammer | Scrap Enabled", true, "Whether Icy Hammer scrap is enabled.");
			ConfigIcyHammerWorth = configFile.Bind<string>("Icy Hammer Options", "Icy Hammer | Worth", "-1,-1", "Min and Max value of the IcyHammer, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigIcyHammerScrapSpawnWeights = configFile.Bind<string>("Icy Hammer Options", "Icy Hammer | Scrap Spawn Weights", "Custom:15,Vanilla:15", "Icy Hammer scrap spawn weights.");
			ConfigSpikyMaceScrapEnabled = configFile.Bind<bool>("Spiky Mace Options", "Spiky Mace | Scrap Enabled", true, "Whether Spiky Mace scrap is enabled.");
			ConfigSpikyMaceWorth = configFile.Bind<string>("Spiky Mace Options", "Spiky Mace | Worth", "-1,-1", "Min and Max value of the SpikyMace, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigSpikyMaceScrapSpawnWeights = configFile.Bind<string>("Spiky Mace Options", "Spiky Mace | Scrap Spawn Weights", "Custom:15,Vanilla:15", "Spiky Mace scrap spawn weights.");
			ConfigEpicAxeScrapEnabled = configFile.Bind<bool>("EpicAxe Options", "Epic Axe Scrap | Enabled", true, "Enables/Disables the Epic Axe from showing up in the Factory.");
			ConfigEpicAxeWorth = configFile.Bind<string>("EpicAxe Options", "Epic Axe Scrap | Worth", "-1,-1", "Min and Max value of the EpicAxe, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigEpicAxeScrapSpawnWeights = configFile.Bind<string>("EpicAxe Options", "Epic Axe Scrap | Spawn Weights", "Custom:15,Vanilla:15", "Spawn Weight of the epic axe in moons.");
			ConfigRedwoodCanEatOldBirds = configFile.Bind<bool>("Redwood Options", "Redwood | Can Eat Old Birds", true, "Whether redwood can eat old birds.");
			ConfigRedwoodMaxSpawnCount = configFile.Bind<int>("Redwood Options", "Redwood | Max Spawn Count", 1, new ConfigDescription("Redwood max spawn count.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 99), Array.Empty<object>()));
			ConfigRedwoodPowerLevel = configFile.Bind<float>("Redwood Options", "Redwood | Power Level", 3f, new ConfigDescription("Redwood power level.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 999f), Array.Empty<object>()));
			ConfigRedwoodShipPadding = configFile.Bind<float>("Redwood Options", "Redwood | Ship Padding", 10f, new ConfigDescription("How far away the redwood usually stays from the ship.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 999f), Array.Empty<object>()));
			ConfigRedwoodSpawnWeights = configFile.Bind<string>("Redwood Options", "Redwood | Spawn Weights", "Modded:50,Vanilla:50", "Redwood spawn weights.");
			ConfigRedwoodSpeed = configFile.Bind<float>("Redwood Options", "Redwood | Speed", 5f, new ConfigDescription("Redwood speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 999f), Array.Empty<object>()));
			ConfigRedwoodEnabled = configFile.Bind<bool>("Redwood Options", "Redwood | Enabled", true, "Whether redwood is enabled.");
			ConfigRedwoodEyesight = configFile.Bind<float>("Redwood Options", "Redwood | Eyesight", 40f, new ConfigDescription("Redwood eyesight.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 999f), Array.Empty<object>()));
			ConfigRedwoodNormalVolume = configFile.Bind<float>("Redwood Options", "Redwood | Normal Volume", 1f, new ConfigDescription("Redwood Normal volume.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigRedwoodHeartEnabled = configFile.Bind<bool>("Redwood Options", "Redwood | Heart Enabled", true, "Whether redwood heart is enabled.");
			ConfigRedwoodInShipVolume = configFile.Bind<float>("Redwood Options", "Redwood | In Ship Volume", 0.75f, new ConfigDescription("Redwood in ship volume.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigMeteorShowerEnabled = configFile.Bind<bool>("MeteorShower Options", "MeteorShower | Enabled", true, "Enables/Disables the MeteorShower from popping up into moons.");
			ConfigMaxMeteorSpawnCount = configFile.Bind<int>("MeteorShower Options", "Meteors | Max Spawn Count", 3, new ConfigDescription("Maximum number of meteors to spawn at once every spawn cycle.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 999), Array.Empty<object>()));
			ConfigMinMeteorSpawnCount = configFile.Bind<int>("MeteorShower Options", "Meteors | Min Spawn Count", 1, new ConfigDescription("Minimum number of meteors to spawn at once every spawn cycle.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 999), Array.Empty<object>()));
			ConfigMeteorSpeed = configFile.Bind<float>("MeteorShower Options", "Meteors | Speed", 30f, new ConfigDescription("Speed of meteors.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>()));
			ConfigMeteorShowerTimeToLeave = configFile.Bind<float>("MeteorShower Options", "MeteorShower | Time To Leave", 0.85f, new ConfigDescription("Normalised time it takes for the meteor shower to leave the moon, 1 being at 12PM~.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigMeteorHitShip = configFile.Bind<bool>("MeteorShower Options", "MeteorShower | Meteor Strikes Ship", false, "Allows striking the ship with a meteor.");
			ConfigMeteorShowerMeteoriteSpawnChance = configFile.Bind<float>("MeteorShower Options", "MeteorShower | Meteorite Spawn Chance", 2.5f, new ConfigDescription("Chance of spawning a meteorite when a meteor is spawned (0 to 100 decimals included).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			ConfigMeteorsDefaultVolume = configFile.Bind<float>("MeteorShower Options", "Meteors | Default Volume", 0.4f, new ConfigDescription("Default Volume of Meteors (between 0 and 1).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigMeteorShowerInShipVolume = configFile.Bind<float>("MeteorShower Options", "MeteorShower | Meteor Volume", 0.3f, new ConfigDescription("Multiplier of the meteors volume for when the player is in the ship and the ship door is closed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigSapphireWorth = configFile.Bind<string>("MeteorShower Options", "MeteorShower | Sapphire Worth", "-1,-1", "Min and Max value of the Sapphire, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigRubyWorth = configFile.Bind<string>("MeteorShower Options", "MeteorShower | Ruby Worth", "-1,-1", "Min and Max value of the Ruby, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigEmeraldWorth = configFile.Bind<string>("MeteorShower Options", "MeteorShower | Emerald Worth", "-1,-1", "Min and Max value of the Emerald, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigFirstLaunchPopup = configFile.Bind<bool>("ModCompat Options", "First Launch Popup", true, "Enables/Disables the first launch popup for the host about the ShockwaveGalModelReplacement mod.");
			ConfigPjonkTurkeyEnabled = configFile.Bind<bool>("ModCompat Options", "Pjonk Turkey | Enabled", false, "Allows the pjonk turkey to spawn in certain conditions");
			ConfigCutieFlyEnabled = configFile.Bind<bool>("CutieFly Options", "CutieFly Enemy | Enabled", false, "Enables/Disables the CutieFly enemy");
			ConfigCutieFlySpawnWeights = configFile.Bind<string>("CutieFly Options", "CutieFly Enemy | Spawn Weights", "Custom:50,Vanilla:50", "SpawnWeight of the CutieFly in moons.");
			ConfigCutieFlyMaxSpawnCount = configFile.Bind<int>("CutieFly Options", "CutieFly Enemy | Max Spawn Count", 5, "How many CutieFlies can spawn at once.");
			ConfigCutieFlyPowerLevel = configFile.Bind<float>("CutieFly Options", "CutieFly Enemy | Power Level", 1f, "Power level of the CutieFly enemy.");
			ConfigCutieFlyFlapWingVolume = configFile.Bind<float>("CutieFly Options", "Cutie Fly | Flap Wing Volume", 0.75f, new ConfigDescription("Volume of flapping wings.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ConfigSnailCatEnabled = configFile.Bind<bool>("SnailCat Options", "SnailCat Enemy | Enabled", false, "Enables/Disables the SnailCat enemy");
			ConfigSnailCatSpawnWeights = configFile.Bind<string>("SnailCat Options", "SnailCat Enemy | Spawn Weights", "Custom:50,Vanilla:50", "SpawnWeight of the SnailCat in moons.");
			ConfigSnailCatMaxSpawnCount = configFile.Bind<int>("SnailCat Options", "SnailCat Enemy | Max Spawn Count", 5, "How many SnailCats can spawn at once.");
			ConfigSnailCatPowerLevel = configFile.Bind<float>("SnailCat Options", "SnailCat Enemy | Power Level", 1f, "Power level of the SnailCat enemy.");
			ConfigHoverboardEnabled = configFile.Bind<bool>("Hoverboard Options", "Hoverboard | Enabled", true, "Enables/Disables the Hoverboard from spawning.");
			ConfigHoverboardCost = configFile.Bind<int>("Hoverboard Options", "Hoverboard | Cost", 500, "Cost of Hoverboard.");
			ConfigWalletEnabled = configFile.Bind<bool>("Wallet Options", "Wallet Item | Enabled", true, "Enables/Disables the Wallet from showing up in shop.");
			ConfigWalletMode = configFile.Bind<bool>("Wallet Options", "Wallet | Mode", true, "true for old system (item mode), false for newer system (non-held mode).");
			ConfigWalletCost = configFile.Bind<int>("Wallet Options", "Wallet Item | Cost", 250, "Cost of Wallet");
			ConfigMoneyEnabled = configFile.Bind<bool>("Money Options", "Money | Enabled", true, "Enables/Disables the Money from spawning.");
			ConfigMoneyAbundance = configFile.Bind<int>("Money Options", "Money Scrap | Abundance", 10, "Overall Abundance of Money in the level.");
			ConfigMinCoinValue = configFile.Bind<int>("Money Options", "Money Scrap | Min Value", 5, "Min value of Money in the level (can be negative).");
			ConfigMaxCoinValue = configFile.Bind<int>("Money Options", "Money Scrap | Max Value", 25, "Max value of Money in the level (has to be higher than min value (or same)).");
			ConfigSnowGlobeEnabled = configFile.Bind<bool>("SnowGlobe Options", "Snow Globe | Enabled", true, "Enables/Disables the Snow Globe from spawning.");
			ConfigSnowGlobeWorth = configFile.Bind<string>("SnowGlobe Options", "Snow Globe | Worth", "-1,-1", "Min and Max value of the SnowGlobe, leave at -1 for both defaults to not mess with base values, values are NOT multiplied by 0.4.");
			ConfigSnowGlobeSpawnWeights = configFile.Bind<string>("SnowGlobe Options", "Snow Globe | Spawn Weights", "Custom:50,Vanilla:50", "Spawn Weight of the Snow Globe in moons.");
			ConfigSnowGlobeMusic = configFile.Bind<bool>("SnowGlobe Options", "Snow Globe | Music", true, "Enables/Disables the music in the snow globe.");
			ConfigItemCrateEnabled = configFile.Bind<bool>("Crate Options", "Crate | Enabled", true, "Enables/Disables the Item Crate from spawning.");
			ConfigMetalCrateSpawnWeight = configFile.Bind<string>("Crate Options", "Crate | Metal SpawnWeight", "Vanilla:3,Custom:3", "MoonName:SpawnWeight of Metal Crates that spawn outside (between 0 and your number).");
			ConfigCrateNumberToSpawn = configFile.Bind<int>("Crate Options", "Crate | Scrap Number To Spawn", 3, "Number of items that spawn inside a crate (between 0 and your number).");
			ConfigWoodenCrateSpawnWeight = configFile.Bind<string>("Crate Options", "Crate | Wooden SpawnWeight", "Vanilla:3,Custom:3", "MoonName:SpawnWeight of Wooden Crates that spawn outside (between 0 and your number).");
			ConfigWoodenCrateHealth = configFile.Bind<int>("Crate Options", "Crate | Wooden Crate Health", 4, "Hits to open Wooden crate");
			ConfigMetalHoldTimer = configFile.Bind<float>("Crate Options", "Crate | Metal Hold Timer", 15f, "Timer to open Metal crate");
			ConfigWoodenCratesBlacklist = configFile.Bind<string>("Crate Options", "Crate | Wooden Blacklist", "", "Blacklist of Items that can spawn from wooden crates (comma separated, recommend leaving empty, CAN become a whitelist).");
			ConfigWoodenCrateIsWhitelist = configFile.Bind<bool>("Crate Options", "Crate | Wooden Crate Is Whitelist", false, "If true, Wooden Crates will spawn using a whitelist which CAN include both shop and non shop items, if false, they will spawn from shop items pool with the blacklist.");
			ConfigMetalCratesBlacklist = configFile.Bind<string>("Crate Options", "Crate | Metal Blacklist", "", "Blacklist of Items that can spawn from metal crates (comma separated, recommend leaving empty).");
			ConfigShovelCratesOnly = configFile.Bind<bool>("Crate Options", "Crate | Shovel Crates Only", true, "Only Shovels can hit Crates.");
			ConfigMetalCrateValueMultiplier = configFile.Bind<float>("Crate Options", "Crate | Metal Value Multiplier", 1.4f, "Value Multiplier for Metal Crates.");
			configFile.SaveOnConfigSet = true;
			ClearUnusedEntries(configFile);
		}

		private void ClearUnusedEntries(ConfigFile configFile)
		{
			PropertyInfo property = ((object)configFile).GetType().GetProperty("OrphanedEntries", BindingFlags.Instance | BindingFlags.NonPublic);
			Dictionary<ConfigDefinition, string> dictionary = (Dictionary<ConfigDefinition, string>)property.GetValue(configFile, null);
			dictionary.Clear();
			configFile.Save();
		}
	}
	public class IngameKeybinds : LcInputActions
	{
		[InputAction("<Keyboard>/w", Name = "HoverForward")]
		public InputAction HoverForward { get; set; }

		[InputAction("<Keyboard>/shift", Name = "SprintForward")]
		public InputAction SprintForward { get; set; }

		[InputAction("<Keyboard>/a", Name = "HoverLeft")]
		public InputAction HoverLeft { get; set; }

		[InputAction("<Keyboard>/s", Name = "HoverBackward")]
		public InputAction HoverBackward { get; set; }

		[InputAction("<Keyboard>/d", Name = "HoverRight")]
		public InputAction HoverRight { get; set; }

		[InputAction("<Keyboard>/space", Name = "HoverUp")]
		public InputAction HoverUp { get; set; }

		[InputAction("<Keyboard>/c", Name = "DropHoverboard")]
		public InputAction DropHoverboard { get; set; }

		[InputAction("<Keyboard>/f", Name = "SwitchMode")]
		public InputAction SwitchMode { get; set; }

		[InputAction(/*Could not decode attribute arguments.*/)]
		public InputAction MouseDelta { get; set; }

		[InputAction(/*Could not decode attribute arguments.*/)]
		public InputAction WalletActivate { get; set; }

		[InputAction("<keyboard>/l", Name = "WalletDrop")]
		public InputAction WalletDrop { get; set; }

		[InputAction("<keyboard>/o", Name = "WalletSell")]
		public InputAction WalletSell { get; set; }
	}
	[BepInPlugin("CodeRebirth", "CodeRebirth", "0.8.11")]
	[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.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		internal class MainAssets : AssetBundleLoader<MainAssets>
		{
			[LoadFromBundle("CodeRebirthUtils.prefab")]
			public GameObject UtilsPrefab { get; private set; }

			public MainAssets(string bundleName)
				: base(bundleName, registerNetworkPrefabs: true, fixMixerGroups: true)
			{
			}
		}

		internal static ManualLogSource Logger = null;

		internal static readonly Harmony _harmony = new Harmony("CodeRebirth");

		internal static readonly Dictionary<string, AssetBundle> LoadedBundles = new Dictionary<string, AssetBundle>();

		internal static bool SubtitlesAPIIsOn = false;

		internal static bool OpenBodyCamsIsOn = false;

		internal static bool ModelReplacementAPIIsOn = false;

		internal static bool MoreSuitsIsOn = false;

		internal static readonly Dictionary<string, Item> samplePrefabs = new Dictionary<string, Item>();

		internal static IngameKeybinds InputActionsInstance = null;

		public static CodeRebirthConfig ModConfig { get; private set; } = null;


		internal static MainAssets Assets { get; private set; } = null;


		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			ModConfig = new CodeRebirthConfig(((BaseUnityPlugin)this).Config);
			if (SubtitlesAPICompatibilityChecker.Enabled)
			{
				SubtitlesAPICompatibilityChecker.Init();
			}
			if (OpenBodyCamCompatibilityChecker.Enabled)
			{
				OpenBodyCamCompatibilityChecker.Init();
			}
			if (MoreSuitsCompatibilityChecker.Enabled)
			{
				MoreSuitsCompatibilityChecker.Init();
			}
			_harmony.PatchAll(typeof(MenuManagerPatch));
			_harmony.PatchAll(typeof(PlayerControllerBPatch));
			_harmony.PatchAll(typeof(EnemyAIPatch));
			_harmony.PatchAll(typeof(ShovelPatch));
			_harmony.PatchAll(typeof(DoorLockPatch));
			_harmony.PatchAll(typeof(MineshaftElevatorControllerPatch));
			_harmony.PatchAll(typeof(DeleteFileButton));
			_harmony.PatchAll(typeof(KeyItemPatch));
			_harmony.PatchAll(typeof(RoundManagerPatch));
			_harmony.PatchAll(typeof(StartOfRoundPatch));
			PlayerControllerBPatch.Init();
			EnemyAIPatch.Init();
			ShovelPatch.Init();
			DoorLockPatch.Init();
			MineshaftElevatorControllerPatch.Init();
			Assets = new MainAssets("coderebirthasset");
			InitializeNetworkBehaviours();
			InputActionsInstance = new IngameKeybinds();
			Logger.LogInfo((object)"Registering content.");
			RegisterContentHandlers(Assembly.GetExecutingAssembly());
			Logger.LogInfo((object)"Plugin CodeRebirth is loaded!");
		}

		public static void RegisterContentHandlers(Assembly assembly)
		{
			List<Type> list = (from x in assembly.GetLoadableTypes()
				where x.BaseType != null && x.BaseType.IsGenericType && x.BaseType.GetGenericTypeDefinition() == typeof(ContentHandler<>)
				select x).ToList();
			foreach (Type item in list)
			{
				item.GetConstructor(Array.Empty<Type>()).Invoke(Array.Empty<object>());
			}
		}

		private void OnDisable()
		{
			foreach (AssetBundle value in LoadedBundles.Values)
			{
				value.Unload(false);
			}
			Logger.LogDebug((object)"Unloaded assetbundles.");
			LoadedBundles.Clear();
		}

		internal static void ExtendedLogging(object text)
		{
			if (ModConfig.ConfigEnableExtendedLogging.Value)
			{
				Logger.LogInfo(text);
			}
		}

		private void InitializeNetworkBehaviours()
		{
			IEnumerable<Type> loadableTypes = Assembly.GetExecutingAssembly().GetLoadableTypes();
			foreach (Type item in loadableTypes)
			{
				if (item.IsNested || !typeof(NetworkBehaviour).IsAssignableFrom(item))
				{
					continue;
				}
				MethodInfo[] methods = item.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array = methods;
				foreach (MethodInfo methodInfo in array)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}
	}
}
namespace CodeRebirth.src.Util
{
	public enum CodeRebirthStatusEffects
	{
		None,
		Water,
		Electric,
		Fire,
		Smoke,
		Windy,
		Blood
	}
	public class CodeRebirthPlayerManager : NetworkBehaviour
	{
		private bool previousDoorClosed;

		internal static Dictionary<PlayerControllerB, CRPlayerData> dataForPlayer = new Dictionary<PlayerControllerB, CRPlayerData>();

		public static GameObject[] playerParticles = (GameObject[])(object)new GameObject[6];

		public static event EventHandler<bool>? OnDoorStateChange;

		public void Awake()
		{
			if ((Object)(object)StartOfRound.Instance != (Object)null)
			{
				previousDoorClosed = StartOfRound.Instance.hangarDoorsClosed;
			}
		}

		public void Update()
		{
			if (!((Object)(object)StartOfRound.Instance == (Object)null))
			{
				if (previousDoorClosed != StartOfRound.Instance.hangarDoorsClosed)
				{
					Plugin.Logger.LogDebug((object)"Door opened/closed!!");
					CodeRebirthPlayerManager.OnDoorStateChange?.Invoke(null, StartOfRound.Instance.hangarDoorsClosed);
				}
				previousDoorClosed = StartOfRound.Instance.hangarDoorsClosed;
			}
		}

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

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string? __getTypeName()
		{
			return "CodeRebirthPlayerManager";
		}
	}
	public class CRPlayerData
	{
		public bool Water;

		public bool Electric;

		public bool Fire;

		public bool Smoke;

		public bool Windy;

		public bool Blood;

		public bool ridingHoverboard;

		public bool holdingWallet;

		public bool flingingAway;

		public bool flung;

		public Hoverboard? hoverboardRiding;

		public List<Collider> playerColliders = new List<Collider>();

		public AnimatorOverrideController? playerOverrideController;

		internal CodeRebirthLocalSave persistentData => CodeRebirthSave.Current.PlayerData[CodeRebirthPlayerManager.dataForPlayer.FirstOrDefault<KeyValuePair<PlayerControllerB, CRPlayerData>>((KeyValuePair<PlayerControllerB, CRPlayerData> it) => it.Value == this).Key.playerSteamId];
	}
	internal static class PlayerControllerBExtensions
	{
		internal enum ApplyEffectResults : sbyte
		{
			Applied,
			Removed,
			None
		}

		internal static ApplyEffectResults ApplyStatusEffect(this PlayerControllerB player, CodeRebirthStatusEffects effect, float range, float distance)
		{
			if (distance < range && !player.HasEffectActive(effect))
			{
				player.ApplyStatusEffect(effect, isActive: true);
				return ApplyEffectResults.Applied;
			}
			if (distance >= range && player.HasEffectActive(effect))
			{
				player.ApplyStatusEffect(effect, isActive: false);
				return ApplyEffectResults.Removed;
			}
			return ApplyEffectResults.None;
		}

		internal static void ApplyStatusEffect(this PlayerControllerB player, CodeRebirthStatusEffects effect, bool isActive)
		{
			if (player.ContainsCRPlayerData())
			{
				CRPlayerData cRPlayerData = player.GetCRPlayerData();
				switch (effect)
				{
				case CodeRebirthStatusEffects.Water:
					cRPlayerData.Water = isActive;
					break;
				case CodeRebirthStatusEffects.Electric:
					cRPlayerData.Electric = isActive;
					break;
				case CodeRebirthStatusEffects.Fire:
					cRPlayerData.Fire = isActive;
					break;
				case CodeRebirthStatusEffects.Smoke:
					cRPlayerData.Smoke = isActive;
					break;
				case CodeRebirthStatusEffects.Windy:
					cRPlayerData.Windy = isActive;
					break;
				case CodeRebirthStatusEffects.Blood:
					cRPlayerData.Blood = isActive;
					break;
				}
			}
		}

		internal static bool HasEffectActive(this PlayerControllerB player, CodeRebirthStatusEffects effect)
		{
			if (!player.ContainsCRPlayerData())
			{
				return false;
			}
			CRPlayerData cRPlayerData = player.GetCRPlayerData();
			return effect switch
			{
				CodeRebirthStatusEffects.Water => cRPlayerData.Water, 
				CodeRebirthStatusEffects.Electric => cRPlayerData.Electric, 
				CodeRebirthStatusEffects.Fire => cRPlayerData.Fire, 
				CodeRebirthStatusEffects.Smoke => cRPlayerData.Smoke, 
				CodeRebirthStatusEffects.Windy => cRPlayerData.Windy, 
				CodeRebirthStatusEffects.Blood => cRPlayerData.Blood, 
				_ => false, 
			};
		}

		internal static CRPlayerData GetCRPlayerData(this PlayerControllerB player)
		{
			return CodeRebirthPlayerManager.dataForPlayer[player];
		}

		internal static bool ContainsCRPlayerData(this PlayerControllerB player)
		{
			return CodeRebirthPlayerManager.dataForPlayer.ContainsKey(player);
		}

		internal static void AddCRPlayerData(this PlayerControllerB player)
		{
			CodeRebirthPlayerManager.dataForPlayer.Add(player, new CRPlayerData());
			player.GetCRPlayerData().playerColliders = new List<Collider>(((Component)player).GetComponentsInChildren<Collider>());
		}

		internal static bool IsHoldingWallet(this PlayerControllerB player)
		{
			return player.GetCRPlayerData().holdingWallet;
		}

		internal static void SetHoldingWallet(this PlayerControllerB player, bool holdingWallet)
		{
			player.GetCRPlayerData().holdingWallet = holdingWallet;
		}

		internal static Hoverboard? TryGetHoverboardRiding(this PlayerControllerB player)
		{
			return player.GetCRPlayerData().hoverboardRiding;
		}

		internal static void SetHoverboardRiding(this PlayerControllerB player, Hoverboard? hoverboard)
		{
			player.GetCRPlayerData().ridingHoverboard = Object.op_Implicit((Object)(object)hoverboard);
		}

		internal static bool IsRidingHoverboard(this PlayerControllerB player)
		{
			return player.GetCRPlayerData().ridingHoverboard;
		}

		internal static void SetRidingHoverboard(this PlayerControllerB player, bool ridingHoverboard)
		{
			player.GetCRPlayerData().ridingHoverboard = ridingHoverboard;
		}

		internal static bool HasFlung(this PlayerControllerB player)
		{
			return player.GetCRPlayerData().flung;
		}

		internal static void SetFlung(this PlayerControllerB player, bool flung)
		{
			player.GetCRPlayerData().flung = flung;
		}

		internal static bool IsFlingingAway(this PlayerControllerB player)
		{
			return player.GetCRPlayerData().flingingAway;
		}

		internal static void SetFlingingAway(this PlayerControllerB player, bool flingingAway)
		{
			player.GetCRPlayerData().flingingAway = flingingAway;
		}

		internal static IEnumerable<Collider> GetPlayerColliders(this PlayerControllerB player)
		{
			return player.GetCRPlayerData().playerColliders;
		}
	}
	internal class CodeRebirthUtils : NetworkBehaviour
	{
		public Material WireframeMaterial;

		public Shader SeeThroughShader;

		[NonSerialized]
		public static List<EnemyType> EnemyTypes = new List<EnemyType>();

		private static Random random = null;

		internal static CodeRebirthUtils Instance { get; private set; } = null;


		private void Awake()
		{
			Instance = this;
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnHazardServerRpc(Vector3 position)
		{
			//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_0089: 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_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(346928474u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 346928474u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				GameObject val3 = MapObjectHandler.hazardPrefabs[0];
				MapObjectHandler.hazardPrefabs.RemoveAt(0);
				NavMeshHit val4 = default(NavMeshHit);
				Vector3 randomNavMeshPositionInRadiusSpherical = RoundManager.Instance.GetRandomNavMeshPositionInRadiusSpherical(position, 2f, val4);
				GameObject val5 = Object.Instantiate<GameObject>(val3, randomNavMeshPositionInRadiusSpherical, Quaternion.identity);
				val5.transform.up = ((NavMeshHit)(ref val4)).normal;
				NetworkObject component = val5.GetComponent<NetworkObject>();
				if ((Object)(object)component != (Object)null)
				{
					component.Spawn(false);
				}
				MapObjectHandler.hazardPrefabs.Add(val3);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnEnemyServerRpc(Vector3 position, string enemyName)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: 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_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_0106: 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)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(828640452u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				bool flag = enemyName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(enemyName, false);
				}
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 828640452u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			if (position == Vector3.zero)
			{
				Plugin.Logger.LogError((object)"Trying to spawn an enemy at Vector3.zero!");
				return;
			}
			foreach (EnemyType enemyType in EnemyTypes)
			{
				Plugin.ExtendedLogging("Trying to spawn: " + enemyType.enemyName);
				if (enemyType.enemyName == enemyName)
				{
					RoundManager.Instance.SpawnEnemyGameObject(position, -1f, 0, enemyType);
					return;
				}
			}
			Plugin.Logger.LogError((object)("Couldn't find enemy of name '" + enemyName + "'!"));
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnScrapServerRpc(string itemName, Vector3 position, bool isQuest = false, bool defaultRotation = true, int valueIncrease = 0)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: 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_00c8: 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)
			//IL_00e3: 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_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: 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_0191: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(345478240u, val, (RpcDelivery)0);
				bool flag = itemName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(itemName, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isQuest, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref defaultRotation, default(ForPrimitives));
				BytePacker.WriteValueBitPacked(val2, valueIncrease);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 345478240u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost) && !(itemName == string.Empty))
			{
				Plugin.samplePrefabs.TryGetValue(itemName, out Item value);
				if ((Object)(object)value == (Object)null)
				{
					Plugin.Logger.LogError((object)("'" + itemName + "' either isn't a CodeRebirth scrap or not registered! This method only handles CodeRebirth scrap!"));
				}
				else
				{
					SpawnScrap(value, position, isQuest, defaultRotation, valueIncrease);
				}
			}
		}

		public NetworkObjectReference SpawnScrap(Item item, Vector3 position, bool isQuest, bool defaultRotation, int valueIncrease)
		{
			//IL_000f: 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_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//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_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_006b: 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_00ff: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)StartOfRound.Instance == (Object)null)
			{
				return default(NetworkObjectReference);
			}
			if (random == null)
			{
				random = new Random(StartOfRound.Instance.randomMapSeed + 85);
			}
			Transform val = null;
			if ((Object)(object)val == (Object)null)
			{
				val = StartOfRound.Instance.propsContainer;
			}
			GameObject val2 = Object.Instantiate<GameObject>(item.spawnPrefab, position + Vector3.up * 0.2f, defaultRotation ? Quaternion.Euler(item.restingRotation) : Quaternion.identity, val);
			val2.GetComponent<NetworkObject>().Spawn(false);
			int num = (int)((float)random.NextInt(item.minValue, item.maxValue) * RoundManager.Instance.scrapValueMultiplier) + valueIncrease;
			ScanNodeProperties componentInChildren = val2.GetComponentInChildren<ScanNodeProperties>();
			componentInChildren.scrapValue = num;
			componentInChildren.subText = $"Value: ${num}";
			val2.GetComponent<GrabbableObject>().scrapValue = num;
			UpdateScanNodeClientRpc(new NetworkObjectReference(val2), num);
			if (isQuest)
			{
				val2.AddComponent<QuestItem>();
			}
			return new NetworkObjectReference(val2);
		}

		[ClientRpc]
		public void UpdateScanNodeClientRpc(NetworkObjectReference go, int value)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: 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_008c: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1188395259u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref go, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, value);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1188395259u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkObject val3 = default(NetworkObject);
				((NetworkObjectReference)(ref go)).TryGet(ref val3, (NetworkManager)null);
				GrabbableObject val4 = default(GrabbableObject);
				if ((Object)(object)val3 != (Object)null && ((Component)val3).gameObject.TryGetComponent<GrabbableObject>(ref val4))
				{
					val4.SetScrapValue(value);
					Plugin.ExtendedLogging($"Scrap Value: {value}");
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void RequestLoadSaveDataServerRPC(int playerID)
		{
			//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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2658846593u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2658846593u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ulong playerSteamId = StartOfRound.Instance.allPlayerScripts[playerID].playerSteamId;
				if (!CodeRebirthSave.Current.PlayerData.ContainsKey(playerSteamId))
				{
					CodeRebirthSave.Current.PlayerData[playerSteamId] = new CodeRebirthLocalSave();
					CodeRebirthSave.Current.Save();
				}
				SetSaveDataClientRPC(playerID, JsonConvert.SerializeObject((object)CodeRebirthSave.Current));
			}
		}

		[ClientRpc]
		private void SetSaveDataClientRPC(int playerID, string saveData)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: 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_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_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Expected O, but got Unknown
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1560865776u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				bool flag = saveData != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(saveData, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1560865776u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				Plugin.ExtendedLogging("Received save data from host!");
				if (!((NetworkBehaviour)this).IsHost && !((NetworkBehaviour)this).IsServer)
				{
					CodeRebirthSave.Current = JsonConvert.DeserializeObject<CodeRebirthSave>(saveData, new JsonSerializerSettings
					{
						ContractResolver = (IContractResolver)(object)new IncludePrivateSetterContractResolver()
					});
				}
			}
		}

		public override void OnNetworkSpawn()
		{
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				CodeRebirthSave.Current = PersistentDataHandler.Load<CodeRebirthSave>($"CRSave{GameNetworkManager.Instance.saveFileNum}");
			}
			Plugin.ExtendedLogging("Attempting to get save data over RPC!");
			Plugin.ExtendedLogging($"LocalClientId: {NetworkManager.Singleton.LocalClientId}");
			Plugin.ExtendedLogging("StartOfRound.Instance.ClientPlayerList: {" + string.Join(", ", StartOfRound.Instance.ClientPlayerList) + "}");
			if (!StartOfRound.Instance.ClientPlayerList.ContainsKey(NetworkManager.Singleton.LocalClientId))
			{
				((MonoBehaviour)this).StartCoroutine(DelayLoadRequestRPC());
				return;
			}
			Plugin.ExtendedLogging("ClientPlayerList already contained the local client id, hooray :3");
			RequestLoadSaveDataServerRPC(StartOfRound.Instance.ClientPlayerList[NetworkManager.Singleton.LocalClientId]);
		}

		private IEnumerator DelayLoadRequestRPC()
		{
			Plugin.Logger.LogInfo((object)"ClientPlayerList did not contain LocalClientId, delaying save data request!");
			yield return (object)new WaitUntil((Func<bool>)(() => StartOfRound.Instance.ClientPlayerList.ContainsKey(NetworkManager.Singleton.LocalClientId)));
			RequestLoadSaveDataServerRPC(StartOfRound.Instance.ClientPlayerList[NetworkManager.Singleton.LocalClientId]);
		}

		private void OnDisable()
		{
			CodeRebirthSave.Current = null;
			PlantPot.totalSpawnedPlantPots = 0;
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_CodeRebirthUtils()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(346928474u, new RpcReceiveHandler(__rpc_handler_346928474));
			NetworkManager.__rpc_func_table.Add(828640452u, new RpcReceiveHandler(__rpc_handler_828640452));
			NetworkManager.__rpc_func_table.Add(345478240u, new RpcReceiveHandler(__rpc_handler_345478240));
			NetworkManager.__rpc_func_table.Add(1188395259u, new RpcReceiveHandler(__rpc_handler_1188395259));
			NetworkManager.__rpc_func_table.Add(2658846593u, new RpcReceiveHandler(__rpc_handler_2658846593));
			NetworkManager.__rpc_func_table.Add(1560865776u, new RpcReceiveHandler(__rpc_handler_1560865776));
		}

		private static void __rpc_handler_346928474(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((CodeRebirthUtils)(object)target).SpawnHazardServerRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_828640452(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string enemyName = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyName, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((CodeRebirthUtils)(object)target).SpawnEnemyServerRpc(position, enemyName);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_345478240(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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: 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_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string itemName = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref itemName, false);
				}
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				bool isQuest = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isQuest, default(ForPrimitives));
				bool defaultRotation = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref defaultRotation, default(ForPrimitives));
				int valueIncrease = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref valueIncrease);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((CodeRebirthUtils)(object)target).SpawnScrapServerRpc(itemName, position, isQuest, defaultRotation, valueIncrease);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1188395259(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_003e: 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_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				NetworkObjectReference go = default(NetworkObjectReference);
				((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref go, default(ForNetworkSerializable));
				int value = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref value);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((CodeRebirthUtils)(object)target).UpdateScanNodeClientRpc(go, value);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2658846593(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)
			{
				int playerID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerID);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((CodeRebirthUtils)(object)target).RequestLoadSaveDataServerRPC(playerID);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1560865776(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerID);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string saveData = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref saveData, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((CodeRebirthUtils)(object)target).SetSaveDataClientRPC(playerID, saveData);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "CodeRebirthUtils";
		}
	}
	public class ContentHandler<T> where T : ContentHandler<T>
	{
		internal static T Instance { get; private set; }

		internal ContentHandler()
		{
			Instance = (T)this;
		}

		protected void RegisterEnemyWithConfig(string configMoonRarity, EnemyType enemy, TerminalNode terminalNode, TerminalKeyword terminalKeyword, float powerLevel, int spawnCount)
		{
			enemy.MaxCount = spawnCount;
			enemy.PowerLevel = powerLevel;
			var (dictionary, dictionary2) = ConfigParsing(configMoonRarity);
			Enemies.RegisterEnemy(enemy, dictionary, dictionary2, terminalNode, terminalKeyword);
		}

		protected void RegisterScrapWithConfig(string configMoonRarity, Item scrap, int itemWorthMin, int itemWorthMax)
		{
			if (itemWorthMax != -1 && itemWorthMin != -1)
			{
				if (itemWorthMax < itemWorthMin)
				{
					itemWorthMax = itemWorthMin;
				}
				scrap.minValue = (int)((float)itemWorthMin / 0.4f);
				scrap.maxValue = (int)((float)itemWorthMax / 0.4f);
			}
			var (dictionary, dictionary2) = ConfigParsing(configMoonRarity);
			Items.RegisterScrap(scrap, dictionary, dictionary2);
		}

		protected void RegisterShopItemWithConfig(bool enabledScrap, Item item, TerminalNode terminalNode, int itemCost, string configMoonRarity, int minWorth, int maxWorth)
		{
			Items.RegisterShopItem(item, (TerminalNode)null, (TerminalNode)null, terminalNode, itemCost);
			if (enabledScrap)
			{
				RegisterScrapWithConfig(configMoonRarity, item, minWorth, maxWorth);
			}
		}

		protected void RegisterInsideMapObjectWithConfig(GameObject prefab, string configString)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invali

plugins/CodeRebirth/XuuXiaolan.CodeRebirthMRAPI.dll

Decompiled 2 hours ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using CodeRebirth.src;
using CodeRebirth.src.Util.AssetLoading;
using CodeRebirthMRAPI.Models;
using Microsoft.CodeAnalysis;
using ModelReplacement;
using On;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("ClientNetworkTransform")]
[assembly: IgnoresAccessChecksTo("DissonanceVoip")]
[assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")]
[assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")]
[assembly: IgnoresAccessChecksTo("Unity.Burst")]
[assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")]
[assembly: IgnoresAccessChecksTo("Unity.Collections")]
[assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.Jobs")]
[assembly: IgnoresAccessChecksTo("Unity.Mathematics")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")]
[assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")]
[assembly: IgnoresAccessChecksTo("Unity.Services.QoS")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Relay")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: AssemblyCompany("XuuXiaolan.CodeRebirthMRAPI")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.8.11.0")]
[assembly: AssemblyInformationalVersion("0.8.11+26edebad8bb9900e1402349486073ca53212d9a2")]
[assembly: AssemblyProduct("CodeRebirthMRAPI")]
[assembly: AssemblyTitle("XuuXiaolan.CodeRebirthMRAPI")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.8.11.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
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;
		}
	}
}
namespace CodeRebirthMRAPI
{
	internal static class GrabbableObjectPatches
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_DiscardItem <0>__GrabbableObject_DiscardItem;

			public static hook_EquipItem <1>__GrabbableObject_EquipItem;
		}

		public static void Init()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_0030: 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_003b: Expected O, but got Unknown
			object obj = <>O.<0>__GrabbableObject_DiscardItem;
			if (obj == null)
			{
				hook_DiscardItem val = GrabbableObject_DiscardItem;
				<>O.<0>__GrabbableObject_DiscardItem = val;
				obj = (object)val;
			}
			GrabbableObject.DiscardItem += (hook_DiscardItem)obj;
			object obj2 = <>O.<1>__GrabbableObject_EquipItem;
			if (obj2 == null)
			{
				hook_EquipItem val2 = GrabbableObject_EquipItem;
				<>O.<1>__GrabbableObject_EquipItem = val2;
				obj2 = (object)val2;
			}
			GrabbableObject.EquipItem += (hook_EquipItem)obj2;
		}

		private static void GrabbableObject_EquipItem(orig_EquipItem orig, GrabbableObject self)
		{
			orig.Invoke(self);
			if (self is JetpackItem)
			{
				Plugin.Logger.LogInfo((object)"Equipped Jetpack");
			}
		}

		private static void GrabbableObject_DiscardItem(orig_DiscardItem orig, GrabbableObject self)
		{
			orig.Invoke(self);
			if (self is JetpackItem)
			{
				Plugin.Logger.LogInfo((object)"Discarded Jetpack");
			}
		}
	}
	internal static class PlayerModelAssets
	{
		internal class ShockwaveModelReplacementAssets : AssetBundleLoader<ShockwaveModelReplacementAssets>
		{
			[LoadFromBundle("ShockwaveGalPlayerModel.prefab")]
			public GameObject ShockwaveModelPrefab { get; private set; }

			public ShockwaveModelReplacementAssets(string bundleName)
				: base(bundleName, true, true)
			{
			}
		}

		internal class SeamineModelReplacementAssets : AssetBundleLoader<SeamineModelReplacementAssets>
		{
			[LoadFromBundle("SeamineGalPlayerModel.prefab")]
			public GameObject SeamineModelPrefab { get; private set; }

			public SeamineModelReplacementAssets(string bundleName)
				: base(bundleName, true, true)
			{
			}
		}

		internal static ShockwaveModelReplacementAssets ShockwaveModelAssets;

		internal static SeamineModelReplacementAssets SeamineModelAssets;

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		internal static void RegisterSuits()
		{
			if (Plugin.ModConfig.ConfigShockwaveGalPlayerModelEnabled.Value)
			{
				Plugin.ExtendedLogging("Delilah is a new model registered!");
				GrabbableObjectPatches.Init();
				ShockwaveModelAssets = new ShockwaveModelReplacementAssets("shockwavegalmodelreplacementassets");
				ModelReplacementAPI.RegisterSuitModelReplacement("Delilah", typeof(ShockwaveGalModel));
			}
			if (Plugin.ModConfig.ConfigSeamineTinkPlayerModelEnabled.Value)
			{
				Plugin.ExtendedLogging("Seamine is a new model registered!");
				SeamineModelAssets = new SeamineModelReplacementAssets("seaminegalmodelreplacementassets");
				ModelReplacementAPI.RegisterSuitModelReplacement("Betty", typeof(SeamineGalModel));
			}
		}
	}
	[BepInPlugin("XuuXiaolan.CodeRebirthMRAPI", "CodeRebirthMRAPI", "0.8.11")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public static Plugin Instance { get; private set; }

		internal static ManualLogSource Logger { get; private set; }

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			if (!Chainloader.PluginInfos.ContainsKey("meow.ModelReplacementAPI"))
			{
				Logger.LogInfo((object)"ModelReplacementAPI is not installed, skipping!");
				return;
			}
			if (!Chainloader.PluginInfos.ContainsKey("x753.More_Suits"))
			{
				Logger.LogInfo((object)"MoreSuits is not installed, skipping!");
				return;
			}
			PlayerModelAssets.RegisterSuits();
			Logger.LogInfo((object)"XuuXiaolan.CodeRebirthMRAPI v0.8.11 has loaded! :3");
		}

		internal static void ExtendedLogging(object text)
		{
			if (Plugin.ModConfig.ConfigEnableExtendedLogging.Value)
			{
				Logger.LogInfo(text);
			}
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "XuuXiaolan.CodeRebirthMRAPI";

		public const string PLUGIN_NAME = "CodeRebirthMRAPI";

		public const string PLUGIN_VERSION = "0.8.11";
	}
}
namespace CodeRebirthMRAPI.Models
{
	public class SeamineGalModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return PlayerModelAssets.SeamineModelAssets.SeamineModelPrefab;
		}
	}
	public class ShockwaveGalModel : BodyReplacementBase
	{
		private Transform controllerLowerSpine;

		protected override GameObject LoadAssetsAndReturnModel()
		{
			return PlayerModelAssets.ShockwaveModelAssets.ShockwaveModelPrefab;
		}

		protected override void Awake()
		{
			((BodyReplacementBase)this).Awake();
			Plugin.ExtendedLogging("Setting jetpack stuff");
			controllerLowerSpine = ((BodyReplacementBase)this).controller.lowerSpine;
			((BodyReplacementBase)this).controller.lowerSpine = base.replacementModel.transform;
		}

		public void OnDisable()
		{
			Plugin.ExtendedLogging("Resetting jetpack stuff");
			((BodyReplacementBase)this).controller.lowerSpine = controllerLowerSpine;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}