Decompiled source of LilosScrapExtension v1.4.0

plugins/LilosScrapExtension/DarthLilo.LilosScrapExtension.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using LethalConfig;
using LethalConfig.ConfigItems;
using LethalLevelLoader;
using LilosScrapExtension.Helpers;
using LilosScrapExtension.Scripts;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("DarthLilo.LilosScrapExtension")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion("1.4.0")]
[assembly: AssemblyProduct("LilosScrapExtension")]
[assembly: AssemblyTitle("DarthLilo.LilosScrapExtension")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.4.0.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.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;
		}
	}
}
[ExecuteInEditMode]
public class ItemGrabEditor : MonoBehaviour
{
	public Transform parentObject;

	public Transform item;

	public bool previewGrab = false;

	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_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: 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_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: 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_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: 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_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)
		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_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)
		if ((Object)(object)item != (Object)null)
		{
			GrabbableObject component = ((Component)item).gameObject.GetComponent<GrabbableObject>();
			if ((Object)(object)component != (Object)null)
			{
				positionOffset = component.itemProperties.positionOffset;
			}
		}
	}
}
namespace LilosScrapExtension
{
	[BepInPlugin("DarthLilo.LilosScrapExtension", "LilosScrapExtension", "1.4.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class LilosScrapExtension : BaseUnityPlugin
	{
		public static ConfigFile Config_Data;

		public static LilosScrapExtension Instance { get; private set; }

		internal static ManualLogSource Logger { get; private set; }

		internal static Harmony? Harmony { get; set; }

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			Config_Data = ((BaseUnityPlugin)this).Config;
			LilosScrapExtensionConfigHelper.SetLethalConfig(Config_Data);
			AssetBundleLoader.AddOnExtendedModLoadedListener((Action<ExtendedMod>)OnExtendedModRegistered, "DarthLilo", "LilosScrapExtension");
			Patch();
			Logger.LogInfo((object)"DarthLilo.LilosScrapExtension v1.4.0 has loaded!");
		}

		internal static void OnExtendedModRegistered(ExtendedMod extendedMod)
		{
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			if ((Object)(object)extendedMod == (Object)null)
			{
				return;
			}
			foreach (ExtendedItem extendedItem in extendedMod.ExtendedItems)
			{
				ConfigEntry<int> configEntryInt = LilosScrapExtensionConfigHelper.GetConfigEntryInt(extendedItem.Item.itemName);
				if (configEntryInt != null)
				{
					Logger.LogInfo((object)(extendedItem.Item.itemName + " " + configEntryInt.Value));
					StringWithRarity item = new StringWithRarity("Vanilla", configEntryInt.Value);
					StringWithRarity item2 = new StringWithRarity("Custom", configEntryInt.Value);
					extendedItem.LevelMatchingProperties.levelTags.Clear();
					extendedItem.LevelMatchingProperties.levelTags.TrimExcess();
					extendedItem.LevelMatchingProperties.levelTags.Add(item);
					extendedItem.LevelMatchingProperties.levelTags.Add(item2);
				}
			}
		}

		internal static void Patch()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			if (Harmony == null)
			{
				Harmony = new Harmony("DarthLilo.LilosScrapExtension");
			}
			Logger.LogDebug((object)"Patching...");
			Harmony.PatchAll();
			Logger.LogDebug((object)"Finished patching!");
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "DarthLilo.LilosScrapExtension";

		public const string PLUGIN_NAME = "LilosScrapExtension";

		public const string PLUGIN_VERSION = "1.4.0";
	}
}
namespace LilosScrapExtension.Scripts
{
	public class CollectedScrapTrigger : MonoBehaviour
	{
		public Animator triggerAnimator;

		public MeshRenderer mainMeshRenderer;

		public MeshFilter mainMeshFilter;

		public SkinnedMeshRenderer mainSkinnedMeshRenderer;

		public AudioSource triggerAudio;

		public AudioSource triggerAudioFar;

		public AudioClip triggerSFX;

		public AudioClip triggerSFXFar;

		public float triggerSFXVolume;

		public Material newMaterial;

		public Mesh newMesh;

		public bool Triggered;

		public void TriggerItem()
		{
			AudioSource obj = triggerAudio;
			if (obj != null)
			{
				obj.PlayOneShot(triggerSFX, triggerSFXVolume);
			}
			AudioSource obj2 = triggerAudioFar;
			if (obj2 != null)
			{
				obj2.PlayOneShot(triggerSFXFar, triggerSFXVolume);
			}
			Animator obj3 = triggerAnimator;
			if (obj3 != null)
			{
				obj3.SetTrigger("collectedScrapTrigger");
			}
			Triggered = true;
			if ((Object)(object)newMaterial != (Object)null)
			{
				if ((Object)(object)mainMeshRenderer != (Object)null)
				{
					((Renderer)mainMeshRenderer).sharedMaterial = newMaterial;
				}
				if ((Object)(object)mainSkinnedMeshRenderer != (Object)null)
				{
					((Renderer)mainSkinnedMeshRenderer).sharedMaterial = newMaterial;
				}
			}
			if ((Object)(object)newMesh != (Object)null)
			{
				if ((Object)(object)mainMeshFilter != (Object)null)
				{
					mainMeshFilter.mesh = newMesh;
				}
				if ((Object)(object)mainSkinnedMeshRenderer != (Object)null)
				{
					mainSkinnedMeshRenderer.sharedMesh = newMesh;
				}
			}
		}
	}
}
namespace LilosScrapExtension.Patches
{
	[HarmonyPatch(typeof(RoundManager))]
	public class CollectedScrapPatch
	{
		[HarmonyPatch("CollectNewScrapForThisRound")]
		[HarmonyPrefix]
		private static bool CollectScrapPrefix(RoundManager __instance, ref GrabbableObject scrapObject)
		{
			if (!scrapObject.itemProperties.isScrap)
			{
				return true;
			}
			if (__instance.scrapCollectedThisRound.Contains(scrapObject))
			{
				return true;
			}
			if (scrapObject.scrapPersistedThroughRounds)
			{
				return true;
			}
			((Component)scrapObject).gameObject.GetComponent<CollectedScrapTrigger>()?.TriggerItem();
			return true;
		}
	}
}
namespace LilosScrapExtension.Helpers
{
	public static class LilosScrapExtensionConfigHelper
	{
		public static ConfigEntry<int> AbiPlushieSpawnRate;

		public static ConfigEntry<int> AhmedPlushieSpawnRate;

		public static ConfigEntry<int> BrandonPlushieSpawnRate;

		public static ConfigEntry<int> CatPlushieSpawnRate;

		public static ConfigEntry<int> ExoPlushieSpawnRate;

		public static ConfigEntry<int> JossPlushieSpawnRate;

		public static ConfigEntry<int> LiloPlushieSpawnRate;

		public static ConfigEntry<int> MarisolPlushieSpawnRate;

		public static ConfigEntry<int> MooMooPlushieSpawnRate;

		public static ConfigEntry<int> QuinnPlushieSpawnRate;

		public static ConfigEntry<int> StarPlushieSpawnRate;

		public static ConfigEntry<int> SwoopPlushieSpawnRate;

		public static ConfigEntry<int> TadpolePlushieSpawnRate;

		public static ConfigEntry<int> WolfPlushieSpawnRate;

		public static ConfigEntry<int> FoxPlushieSpawnRate;

		public static ConfigEntry<int> AxolotlPlushieSpawnRate;

		public static ConfigEntry<int> FreddyPlushieSpawnRate;

		public static ConfigEntry<int> FoxyPlushieSpawnRate;

		public static ConfigEntry<int> BonniePlushieSpawnRate;

		public static ConfigEntry<int> ChicaPlushieSpawnRate;

		public static ConfigEntry<int> ToyFoxyPlushieSpawnRate;

		public static ConfigEntry<int> GoldenFreddyPlushieSpawnRate;

		public static ConfigEntry<int> FredbearPlushieSpawnRate;

		public static ConfigEntry<int> FazbearPizzaSpawnRate;

		public static ConfigEntry<int> AlastorHamsterPillowSpawnRate;

		public static Dictionary<string, ConfigEntry<int>> ConfigList = new Dictionary<string, ConfigEntry<int>>();

		public static void SetLethalConfig(ConfigFile config)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Expected O, but got Unknown
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Expected O, but got Unknown
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Expected O, but got Unknown
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Expected O, but got Unknown
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Expected O, but got Unknown
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Expected O, but got Unknown
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Expected O, but got Unknown
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Expected O, but got Unknown
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Expected O, but got Unknown
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Expected O, but got Unknown
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Expected O, but got Unknown
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Expected O, but got Unknown
			//IL_0383: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Expected O, but got Unknown
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Expected O, but got Unknown
			//IL_03ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Expected O, but got Unknown
			//IL_043d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0444: Expected O, but got Unknown
			//IL_047b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0482: Expected O, but got Unknown
			//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c0: Expected O, but got Unknown
			//IL_04f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fe: Expected O, but got Unknown
			//IL_0535: Unknown result type (might be due to invalid IL or missing references)
			//IL_053c: Expected O, but got Unknown
			//IL_0573: Unknown result type (might be due to invalid IL or missing references)
			//IL_057a: Expected O, but got Unknown
			//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Expected O, but got Unknown
			//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f6: Expected O, but got Unknown
			AbiPlushieSpawnRate = config.Bind<int>("Main Config", "AbiPlushieSpawnRate", 10, "The chance for an Abi Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val = new IntInputFieldConfigItem(AbiPlushieSpawnRate, true);
			ConfigList.Add("Abi Plushie", AbiPlushieSpawnRate);
			AhmedPlushieSpawnRate = config.Bind<int>("Main Config", "AhmedPlushieSpawnRate", 10, "The chance for an Ahmed Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val2 = new IntInputFieldConfigItem(AhmedPlushieSpawnRate, true);
			ConfigList.Add("Ahmed Plushie", AhmedPlushieSpawnRate);
			BrandonPlushieSpawnRate = config.Bind<int>("Main Config", "BrandonPlushieSpawnRate", 10, "The chance for a Brandon Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val3 = new IntInputFieldConfigItem(BrandonPlushieSpawnRate, true);
			ConfigList.Add("Brandon Plushie", BrandonPlushieSpawnRate);
			CatPlushieSpawnRate = config.Bind<int>("Main Config", "CatPlushieSpawnRate", 10, "The chance for a Cat Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val4 = new IntInputFieldConfigItem(CatPlushieSpawnRate, true);
			ConfigList.Add("Cat Plushie", CatPlushieSpawnRate);
			ExoPlushieSpawnRate = config.Bind<int>("Main Config", "ExoPlushieSpawnRate", 10, "The chance for an Exo Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val5 = new IntInputFieldConfigItem(ExoPlushieSpawnRate, true);
			ConfigList.Add("Exo Plushie", ExoPlushieSpawnRate);
			JossPlushieSpawnRate = config.Bind<int>("Main Config", "JossPlushieSpawnRate", 10, "The chance for a Joss Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val6 = new IntInputFieldConfigItem(JossPlushieSpawnRate, true);
			ConfigList.Add("Joss Plushie", JossPlushieSpawnRate);
			LiloPlushieSpawnRate = config.Bind<int>("Main Config", "LiloPlushieSpawnRate", 10, "The chance for a Lilo Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val7 = new IntInputFieldConfigItem(LiloPlushieSpawnRate, true);
			ConfigList.Add("Lilo Plushie", LiloPlushieSpawnRate);
			MarisolPlushieSpawnRate = config.Bind<int>("Main Config", "MarisolPlushieSpawnRate", 10, "The chance for a Marisol Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val8 = new IntInputFieldConfigItem(MarisolPlushieSpawnRate, true);
			ConfigList.Add("Marisol Plushie", MarisolPlushieSpawnRate);
			MooMooPlushieSpawnRate = config.Bind<int>("Main Config", "MooMooPlushieSpawnRate", 10, "The chance for a Moo Moo Cow to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val9 = new IntInputFieldConfigItem(MooMooPlushieSpawnRate, true);
			ConfigList.Add("Moo Moo Cow", MooMooPlushieSpawnRate);
			QuinnPlushieSpawnRate = config.Bind<int>("Main Config", "QuinnPlushieSpawnRate", 10, "The chance for a Quinn Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val10 = new IntInputFieldConfigItem(QuinnPlushieSpawnRate, true);
			ConfigList.Add("Quinn Plushie", QuinnPlushieSpawnRate);
			StarPlushieSpawnRate = config.Bind<int>("Main Config", "StarPlushieSpawnRate", 10, "The chance for a Star Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val11 = new IntInputFieldConfigItem(StarPlushieSpawnRate, true);
			ConfigList.Add("Star Plushie", StarPlushieSpawnRate);
			SwoopPlushieSpawnRate = config.Bind<int>("Main Config", "SwoopPlushieSpawnRate", 10, "The chance for a Swoop Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val12 = new IntInputFieldConfigItem(SwoopPlushieSpawnRate, true);
			ConfigList.Add("Swoop Plushie", SwoopPlushieSpawnRate);
			TadpolePlushieSpawnRate = config.Bind<int>("Main Config", "TadpolePlushieSpawnRate", 10, "The chance for a Tadpole Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val13 = new IntInputFieldConfigItem(TadpolePlushieSpawnRate, true);
			ConfigList.Add("Tadpole Plushie", TadpolePlushieSpawnRate);
			WolfPlushieSpawnRate = config.Bind<int>("Main Config", "WolfPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val14 = new IntInputFieldConfigItem(WolfPlushieSpawnRate, true);
			ConfigList.Add("Wolf Plushie", WolfPlushieSpawnRate);
			FoxPlushieSpawnRate = config.Bind<int>("Main Config", "FoxPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val15 = new IntInputFieldConfigItem(FoxPlushieSpawnRate, true);
			ConfigList.Add("Fox Plushie", FoxPlushieSpawnRate);
			AxolotlPlushieSpawnRate = config.Bind<int>("Main Config", "AxolotlPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val16 = new IntInputFieldConfigItem(AxolotlPlushieSpawnRate, true);
			ConfigList.Add("Axolotl Plushie", AxolotlPlushieSpawnRate);
			FreddyPlushieSpawnRate = config.Bind<int>("Main Config", "FreddyPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val17 = new IntInputFieldConfigItem(FreddyPlushieSpawnRate, true);
			ConfigList.Add("Freddy Plushie", FreddyPlushieSpawnRate);
			FoxyPlushieSpawnRate = config.Bind<int>("Main Config", "FoxyPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val18 = new IntInputFieldConfigItem(FoxyPlushieSpawnRate, true);
			ConfigList.Add("Foxy Plushie", FoxyPlushieSpawnRate);
			BonniePlushieSpawnRate = config.Bind<int>("Main Config", "BonniePlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val19 = new IntInputFieldConfigItem(BonniePlushieSpawnRate, true);
			ConfigList.Add("Bonnie Plushie", BonniePlushieSpawnRate);
			ChicaPlushieSpawnRate = config.Bind<int>("Main Config", "ChicaPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val20 = new IntInputFieldConfigItem(ChicaPlushieSpawnRate, true);
			ConfigList.Add("Chica Plushie", ChicaPlushieSpawnRate);
			ToyFoxyPlushieSpawnRate = config.Bind<int>("Main Config", "ToyFoxyPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val21 = new IntInputFieldConfigItem(ToyFoxyPlushieSpawnRate, true);
			ConfigList.Add("Toy Foxy Plushie", ToyFoxyPlushieSpawnRate);
			GoldenFreddyPlushieSpawnRate = config.Bind<int>("Main Config", "GoldenFreddyPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val22 = new IntInputFieldConfigItem(GoldenFreddyPlushieSpawnRate, true);
			ConfigList.Add("Golden Freddy Plushie", GoldenFreddyPlushieSpawnRate);
			FredbearPlushieSpawnRate = config.Bind<int>("Main Config", "FredbearPlushieSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val23 = new IntInputFieldConfigItem(FredbearPlushieSpawnRate, true);
			ConfigList.Add("Fredbear Plushie", FredbearPlushieSpawnRate);
			FazbearPizzaSpawnRate = config.Bind<int>("Main Config", "FazbearPizzaSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val24 = new IntInputFieldConfigItem(FazbearPizzaSpawnRate, true);
			ConfigList.Add("Freddy Fazbear's Pizza", FazbearPizzaSpawnRate);
			AlastorHamsterPillowSpawnRate = config.Bind<int>("Main Config", "AlastorHamsterPillowSpawnRate", 10, "The chance for a Wolf Plushie to spawn, set to 0 to disable!");
			IntInputFieldConfigItem val25 = new IntInputFieldConfigItem(AlastorHamsterPillowSpawnRate, true);
			ConfigList.Add("Alastor Pillow", AlastorHamsterPillowSpawnRate);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val3);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val5);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val7);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val9);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val10);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val11);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val13);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val14);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val15);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val16);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val17);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val18);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val19);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val20);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val21);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val22);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val23);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val24);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val25);
			LethalConfigManager.SetModDescription("Silly little mod which adds a ton of random scraps");
		}

		public static ConfigEntry<int> GetConfigEntryInt(string itemName)
		{
			if (ConfigList.ContainsKey(itemName))
			{
				return ConfigList[itemName];
			}
			LilosScrapExtension.Logger.LogInfo((object)("Unable to find " + itemName + " in config, skipping!"));
			return null;
		}
	}
}