Decompiled source of Simple Meads v1.4.3

SimpleMeads.dll

Decompiled 5 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("SimpleMeads")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SimpleMeads")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("24fcaab5-a656-46be-b59d-bc9b8849563c")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SimpleMeads;

[BepInPlugin("elric.SimpleMeads", "Simple Meads", "1.4.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
internal class SimpleMeads : BaseUnityPlugin
{
	[HarmonyPatch]
	public class CheckForTeleport
	{
		[HarmonyPatch(typeof(Humanoid), "IsTeleportable")]
		[HarmonyPostfix]
		private static void DoTeleport(ref Humanoid __instance, ref bool __result)
		{
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Teleport_Anything")))
			{
				__result = true;
			}
		}
	}

	[HarmonyPatch]
	public static class CheckForHardDeath
	{
		[HarmonyPatch(typeof(Player), "HardDeath")]
		[HarmonyPostfix]
		private static void CheckDeath(ref Player __instance, ref bool __result)
		{
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Soft_Death")))
			{
				__result = false;
			}
		}
	}

	[HarmonyPatch]
	public static class PlayerUpdate
	{
		[HarmonyPatch(typeof(Player), "FixedUpdate")]
		[HarmonyPostfix]
		private static void CheckDeath(ref Player __instance)
		{
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Rested")) && ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Rested")))
			{
				float remaningTime = ((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("Rested")).GetRemaningTime();
				float remaningTime2 = ((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Rested")).GetRemaningTime();
				if (remaningTime > remaningTime2)
				{
					((Character)__instance).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Rested"), true);
				}
				else
				{
					((Character)__instance).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("Rested"), true);
				}
			}
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Quick_Dry")) && ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Wet")))
			{
				((Character)__instance).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("Wet"), true);
			}
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Fast_Attack")) && (double)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Fast_Attack")).GetRemaningTime() <= 0.03)
			{
				((Character)__instance).GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Potion_Cooldown"), true, 0, 0f);
			}
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Exp_Buff")) && (double)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Exp_Buff")).GetRemaningTime() <= 0.03)
			{
				((Character)__instance).GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Potion_Cooldown"), true, 0, 0f);
			}
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Soft_Death")) && (double)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Soft_Death")).GetRemaningTime() <= 0.03)
			{
				((Character)__instance).GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Potion_Cooldown"), true, 0, 0f);
			}
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Speed_Buff")) && (double)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Speed_Buff")).GetRemaningTime() <= 0.03)
			{
				((Character)__instance).GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Potion_Cooldown"), true, 0, 0f);
			}
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Teleport_Anything")) && (double)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Teleport_Anything")).GetRemaningTime() <= 0.03)
			{
				((Character)__instance).GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Potion_Cooldown"), true, 0, 0f);
			}
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_NoMobs")) && (double)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_NoMobs")).GetRemaningTime() <= 0.03)
			{
				((Character)__instance).GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Potion_Cooldown"), true, 0, 0f);
			}
		}
	}

	[HarmonyPatch]
	public static class CheckForSwimming
	{
		[HarmonyPatch(typeof(Player), "OnSwimming")]
		[HarmonyPostfix]
		private static void SpeedSwimming(ref Player __instance, ref Vector3 targetVel)
		{
			if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Speed_Buff")))
			{
				((Character)__instance).m_swimSpeed = swimSpeed;
			}
			else
			{
				((Character)__instance).m_swimSpeed = 2f;
			}
		}
	}

	[HarmonyPatch]
	public static class CheckForAttack
	{
		[HarmonyPatch(typeof(CharacterAnimEvent), "CustomFixedUpdate")]
		[HarmonyPrefix]
		private static void Prefix(Character ___m_character, ref Animator ___m_animator)
		{
			if (___m_character.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SM_Fast_Attack")))
			{
				___m_animator.speed = faSpeed;
				___m_character.AddStamina(4f);
			}
		}
	}

	public const string PluginGUID = "elric.SimpleMeads";

	public const string PluginName = "Simple Meads";

	public const string PluginVersion = "1.4.0";

	public static bool isModded = true;

	public AssetBundle SimpleMeadsAssets;

	private static GameObject GreaterHealth;

	private static GameObject GreaterStamina;

	private static GameObject SpeedBuff;

	private static GameObject RestedBuff;

	private static GameObject ExpBuff;

	private static GameObject NoSkillDrainBuff;

	private static GameObject TeleportAnythingBuff;

	private static GameObject WarmBuff;

	private static GameObject FastAttackBuff;

	private static GameObject SilentBuff;

	private static GameObject LingerEitr;

	private static GameObject BaseGreaterHealth;

	private static GameObject BaseGreaterStamina;

	private static GameObject BaseSpeedBuff;

	private static GameObject BaseRestedBuff;

	private static GameObject BaseExpBuff;

	private static GameObject BaseNoSkillDrain;

	private static GameObject BaseTeleportAnything;

	private static GameObject BaseWarmBuff;

	private static GameObject BaseFastAttackBuff;

	private static GameObject BaseSilentBuff;

	private static GameObject BaseLingerEitr;

	private CustomStatusEffect GreaterHealthSE;

	private CustomStatusEffect GreaterStamSE;

	private CustomStatusEffect PotionCooldownSE;

	private CustomStatusEffect ExpBuffSE;

	private CustomStatusEffect FastAttackSE;

	private CustomStatusEffect RestedSE;

	private CustomStatusEffect NoSkillLossSE;

	private CustomStatusEffect TeleportAnythingSE;

	private CustomStatusEffect SpeedSE;

	private CustomStatusEffect WarmSE;

	private CustomStatusEffect SilentSE;

	private CustomStatusEffect NoiseReduction;

	private CustomStatusEffect LingerEitrSE;

	private ConfigEntry<float> GreaterHealthTotal;

	private ConfigEntry<int> GreaterHealthDuration;

	private ConfigEntry<int> GreaterStamTotal;

	private ConfigEntry<int> GreaterStamDuration;

	private ConfigEntry<int> GreaterStamCooldown;

	private ConfigEntry<int> RestedDuration;

	private ConfigEntry<int> SoftDeathDuration;

	private ConfigEntry<int> QuickDryDuration;

	private ConfigEntry<int> ExpBuffDuration;

	private ConfigEntry<float> ExpBuffMultiplier;

	private ConfigEntry<int> FastAttackDuration;

	private ConfigEntry<float> FastAttackSpeed;

	private ConfigEntry<int> SpeedBuffDuration;

	private ConfigEntry<float> SpeedBuffMovementSpeed;

	private ConfigEntry<float> SpeedBuffSwimSpeed;

	private ConfigEntry<int> TeleportDuration;

	private ConfigEntry<int> PotionCooldownDuration;

	private ConfigEntry<int> SilentDuration;

	private ConfigEntry<float> EitrAmount;

	private ConfigEntry<int> EitrDuration;

	private CustomLocalization translate;

	private static float faSpeed;

	private static float swimSpeed;

	private static List<CustomItem> items = new List<CustomItem>();

	private void Awake()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		new Harmony("elric.SimpleMeads").PatchAll();
		CreateConfig();
		LoadBundle();
		LoadAssets();
		addMeads();
		LoadAddEffects();
		addRecipes();
		addFermenting();
		addLocalizations();
		PrefabManager.OnPrefabsRegistered += loadCustomValues;
		PrefabManager.OnPrefabsRegistered += DoRendering;
	}

	private void CreateConfig()
	{
		//IL_0075: 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_0082: Expected O, but got Unknown
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Expected O, but got Unknown
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Expected O, but got Unknown
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Expected O, but got Unknown
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Expected O, but got Unknown
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Expected O, but got Unknown
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: Expected O, but got Unknown
		//IL_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Expected O, but got Unknown
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Expected O, but got Unknown
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Expected O, but got Unknown
		//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bb: Expected O, but got Unknown
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c5: Expected O, but got Unknown
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f8: Expected O, but got Unknown
		//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Expected O, but got Unknown
		//IL_022b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0230: Unknown result type (might be due to invalid IL or missing references)
		//IL_0238: Expected O, but got Unknown
		//IL_0238: Unknown result type (might be due to invalid IL or missing references)
		//IL_0242: Expected O, but got Unknown
		//IL_026b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0270: Unknown result type (might be due to invalid IL or missing references)
		//IL_0278: Expected O, but got Unknown
		//IL_0278: Unknown result type (might be due to invalid IL or missing references)
		//IL_0282: Expected O, but got Unknown
		//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b8: Expected O, but got Unknown
		//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c2: Expected O, but got Unknown
		//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f5: Expected O, but got Unknown
		//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ff: Expected O, but got Unknown
		//IL_0328: Unknown result type (might be due to invalid IL or missing references)
		//IL_032d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0335: Expected O, but got Unknown
		//IL_0335: Unknown result type (might be due to invalid IL or missing references)
		//IL_033f: Expected O, but got Unknown
		//IL_0365: Unknown result type (might be due to invalid IL or missing references)
		//IL_036a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0372: Expected O, but got Unknown
		//IL_0372: Unknown result type (might be due to invalid IL or missing references)
		//IL_037c: Expected O, but got Unknown
		//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b2: Expected O, but got Unknown
		//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03bc: Expected O, but got Unknown
		//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f3: Expected O, but got Unknown
		//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_03fd: Expected O, but got Unknown
		//IL_0423: Unknown result type (might be due to invalid IL or missing references)
		//IL_0428: Unknown result type (might be due to invalid IL or missing references)
		//IL_0430: Expected O, but got Unknown
		//IL_0430: Unknown result type (might be due to invalid IL or missing references)
		//IL_043a: Expected O, but got Unknown
		//IL_0463: Unknown result type (might be due to invalid IL or missing references)
		//IL_0468: Unknown result type (might be due to invalid IL or missing references)
		//IL_0470: Expected O, but got Unknown
		//IL_0470: Unknown result type (might be due to invalid IL or missing references)
		//IL_047a: Expected O, but got Unknown
		//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b0: Expected O, but got Unknown
		//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ba: Expected O, but got Unknown
		//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f0: Expected O, but got Unknown
		//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fa: Expected O, but got Unknown
		//IL_0520: Unknown result type (might be due to invalid IL or missing references)
		//IL_0525: Unknown result type (might be due to invalid IL or missing references)
		//IL_052d: Expected O, but got Unknown
		//IL_052d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0537: Expected O, but got Unknown
		AcceptableValueRange<float> val = new AcceptableValueRange<float>(0f, 5f);
		AcceptableValueRange<float> val2 = new AcceptableValueRange<float>(0f, 5f);
		AcceptableValueRange<float> val3 = new AcceptableValueRange<float>(1f, 3f);
		AcceptableValueRange<float> val4 = new AcceptableValueRange<float>(1f, 3f);
		AcceptableValueRange<float> val5 = new AcceptableValueRange<float>(1f, 8f);
		GreaterHealthTotal = ((BaseUnityPlugin)this).Config.Bind<float>("Greater Health", "HealthPerTick", 4f, new ConfigDescription("How much health should the Lingering Health Potion provide each application? (1 application every 10 seconds)", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		GreaterHealthDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Greater Health", "LingeringHealthDuration", 300, new ConfigDescription("How long should Lingering Health Potion last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		GreaterStamTotal = ((BaseUnityPlugin)this).Config.Bind<int>("Greater Stamina", "GreaterStamTotal", 260, new ConfigDescription("How much health should the Greater Health Potion restore?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		GreaterStamDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Greater Stamina", "GreaterStamDuration", 2, new ConfigDescription("How many seconds should it take for the Greater Health Potion to restore the total health?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		GreaterStamCooldown = ((BaseUnityPlugin)this).Config.Bind<int>("Greater Stamina", "GreaterStamCooldown", 120, new ConfigDescription("How many seconds before you can take another Greater Health Potion?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		RestedDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Comforts Of Home", "ComfortsOfHomeDuration", 600, new ConfigDescription("How many seconds should Comforts of Home (Rested Buff) last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		SoftDeathDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Cheat Death", "CheatDeathDuration", 120, new ConfigDescription("How many seconds should Cheat Death last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		QuickDryDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Quick Dry", "QuickDryDuration", 180, new ConfigDescription("How many seconds should Quick Dry last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		ExpBuffDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Skills Growth", "SkillsGrowthDuration", 300, new ConfigDescription("How many seconds should Skills Growth last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		ExpBuffMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Skills Growth", "SkillsGrowthMultiplier", 2f, new ConfigDescription("What percentage, between 0 and 5 where 2 is 200% increase, should Skills Growth increase skill exp gain?", (AcceptableValueBase)(object)val, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		FastAttackDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Fast Attack", "FastAttackDuration", 30, new ConfigDescription("How many seconds should Fast Attack last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		FastAttackSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Fast Attack", "FastAttackSpeed", 1.8f, new ConfigDescription("How fast, between 1 and 3 where 1.8 is 80% faster, should Fast Attack attack? A small increase will show significant increase in speed. 3f is insanely fast.", (AcceptableValueBase)(object)val3, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		SpeedBuffDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Speedy Retreat", "SpeedyRetreatDuration", 30, new ConfigDescription("How many seconds should Speedy Retreat last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		SpeedBuffMovementSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Speedy Retreat", "SpeedyRetreatMovementSpeed", 1.2f, new ConfigDescription("How fast, between 1 and 3 where 1.2 is 20% faster, should Speedy Retreat move? A small increase will show significant increase in speed. 3f is insanely fast.", (AcceptableValueBase)(object)val4, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		SpeedBuffSwimSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Speedy Retreat", "SpeedyRetreatSwimSpeed", 4f, new ConfigDescription("How fast, between 1 and 8 where 4.0 is 400% faster, should Speedy Retreat swim? 8f is insanely fast.", (AcceptableValueBase)(object)val5, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		TeleportDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Miners Delight", "MinersDelightDuration", 120, new ConfigDescription("How many seconds should Miners Delight last? (teleport ores,eggs and dverger thingies)", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		SilentDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Silent But Deadly", "SBDDuration", 300, new ConfigDescription("How many seconds should Silent But Deadly last? (noise doesn't attract mobs)", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		EitrAmount = ((BaseUnityPlugin)this).Config.Bind<float>("Lingering Eitr", "EitrAmount", 1.5f, new ConfigDescription("What percentage, where 1.2 is 120%, should Lingering Eitr increase eitr regeneration?", (AcceptableValueBase)(object)val2, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		EitrDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Lingering Eitr", "EitrDuration", 300, new ConfigDescription("How many seconds should Lingering Eitr last?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		PotionCooldownDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Utility Potion Cooldown", "PotionCooldownDuration", 120, new ConfigDescription("How many seconds before you can take another Quick Dry, Fast Attack, Speedy Retreat, Skills Growth, Cheat Death, Miners Delight or Silent But Deadly again?", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
	}

	private void LoadBundle()
	{
		try
		{
			SimpleMeadsAssets = AssetUtils.LoadAssetBundleFromResources("simple_meads", Assembly.GetExecutingAssembly());
		}
		catch (Exception arg)
		{
			((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while loading bundle: {arg}");
		}
	}

	private void LoadAssets()
	{
		try
		{
			GreaterHealth = SimpleMeadsAssets.LoadAsset<GameObject>("sm_greater_health");
			GreaterStamina = SimpleMeadsAssets.LoadAsset<GameObject>("sm_greater_stamina");
			SpeedBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_speed_buff");
			RestedBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_rested_buff");
			ExpBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_exp_buff");
			NoSkillDrainBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_no_skill_buff");
			TeleportAnythingBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_teleport_anything");
			WarmBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_warm_buff");
			FastAttackBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_fast_attack_buff");
			SilentBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_silent");
			LingerEitr = SimpleMeadsAssets.LoadAsset<GameObject>("sm_linger_eitr");
			BaseGreaterHealth = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_greaterhealth");
			BaseGreaterStamina = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_greaterstamina");
			BaseExpBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_exp");
			BaseRestedBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_rested");
			BaseNoSkillDrain = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_skilldrain");
			BaseSpeedBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_speed");
			BaseTeleportAnything = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_teleport");
			BaseWarmBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_warm");
			BaseFastAttackBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_fast_attack");
			BaseSilentBuff = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_silent");
			BaseLingerEitr = SimpleMeadsAssets.LoadAsset<GameObject>("sm_base_eitr");
		}
		catch (Exception arg)
		{
			((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while loading assets: {arg}");
		}
	}

	private void LoadAddEffects()
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Expected O, but got Unknown
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Expected O, but got Unknown
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Expected O, but got Unknown
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Expected O, but got Unknown
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Expected O, but got Unknown
		//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Expected O, but got Unknown
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Expected O, but got Unknown
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Expected O, but got Unknown
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0196: Expected O, but got Unknown
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c5: Expected O, but got Unknown
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f4: Expected O, but got Unknown
		//IL_0219: Unknown result type (might be due to invalid IL or missing references)
		//IL_0223: Expected O, but got Unknown
		try
		{
			SE_Stats val = SimpleMeadsAssets.LoadAsset<SE_Stats>("SM_Linger_Eitr");
			LingerEitrSE = new CustomStatusEffect((StatusEffect)(object)val, true);
			ItemManager.Instance.AddStatusEffect(LingerEitrSE);
			val = SimpleMeadsAssets.LoadAsset<SE_Stats>("SM_Noise_Reduction");
			NoiseReduction = new CustomStatusEffect((StatusEffect)(object)val, true);
			ItemManager.Instance.AddStatusEffect(NoiseReduction);
			val = SimpleMeadsAssets.LoadAsset<SE_Stats>("SM_Health_Greater");
			GreaterHealthSE = new CustomStatusEffect((StatusEffect)(object)val, true);
			ItemManager.Instance.AddStatusEffect(GreaterHealthSE);
			StatusEffect val2 = SimpleMeadsAssets.LoadAsset<StatusEffect>("SM_Potion_Cooldown");
			PotionCooldownSE = new CustomStatusEffect(val2, true);
			ItemManager.Instance.AddStatusEffect(PotionCooldownSE);
			val = SimpleMeadsAssets.LoadAsset<SE_Stats>("SM_Exp_Buff");
			ExpBuffSE = new CustomStatusEffect((StatusEffect)(object)val, true);
			ItemManager.Instance.AddStatusEffect(ExpBuffSE);
			val2 = SimpleMeadsAssets.LoadAsset<StatusEffect>("SM_Fast_Attack");
			FastAttackSE = new CustomStatusEffect(val2, true);
			ItemManager.Instance.AddStatusEffect(FastAttackSE);
			val2 = SimpleMeadsAssets.LoadAsset<StatusEffect>("SM_Quick_Dry");
			WarmSE = new CustomStatusEffect(val2, true);
			ItemManager.Instance.AddStatusEffect(WarmSE);
			val = (SE_Stats)(object)SimpleMeadsAssets.LoadAsset<SE_Rested>("SM_Rested");
			RestedSE = new CustomStatusEffect((StatusEffect)(object)val, true);
			ItemManager.Instance.AddStatusEffect(RestedSE);
			val = SimpleMeadsAssets.LoadAsset<SE_Stats>("SM_Speed_Buff");
			SpeedSE = new CustomStatusEffect((StatusEffect)(object)val, true);
			ItemManager.Instance.AddStatusEffect(SpeedSE);
			val2 = SimpleMeadsAssets.LoadAsset<StatusEffect>("SM_Soft_Death");
			NoSkillLossSE = new CustomStatusEffect(val2, true);
			ItemManager.Instance.AddStatusEffect(NoSkillLossSE);
			val = SimpleMeadsAssets.LoadAsset<SE_Stats>("SM_Stamina_Greater");
			GreaterStamSE = new CustomStatusEffect((StatusEffect)(object)val, true);
			ItemManager.Instance.AddStatusEffect(GreaterStamSE);
			val2 = SimpleMeadsAssets.LoadAsset<StatusEffect>("SM_Teleport_Anything");
			TeleportAnythingSE = new CustomStatusEffect(val2, true);
			ItemManager.Instance.AddStatusEffect(TeleportAnythingSE);
		}
		catch (Exception arg)
		{
			((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding effects: {arg}");
		}
		finally
		{
			PrefabManager.OnPrefabsRegistered -= LoadAddEffects;
		}
	}

	private void loadCustomValues()
	{
		SE_Stats GreaterHealthCustom = Cache.GetPrefab<SE_Stats>("SM_Health_Greater");
		GreaterHealthCustom.m_healthPerTick = GreaterHealthTotal.Value;
		GreaterHealthCustom.m_tickInterval = 10f;
		((StatusEffect)GreaterHealthCustom).m_ttl = GreaterHealthDuration.Value;
		GreaterHealthTotal.SettingChanged += delegate
		{
			GreaterHealthCustom.m_healthPerTick = GreaterHealthTotal.Value;
		};
		GreaterHealthDuration.SettingChanged += delegate
		{
			((StatusEffect)GreaterHealthCustom).m_ttl = GreaterHealthDuration.Value;
		};
		SE_Stats GreaterStamCustom = Cache.GetPrefab<SE_Stats>("SM_Stamina_Greater");
		GreaterStamCustom.m_staminaOverTime = GreaterStamTotal.Value;
		GreaterStamCustom.m_staminaOverTimeDuration = GreaterStamDuration.Value;
		((StatusEffect)GreaterStamCustom).m_ttl = GreaterStamCooldown.Value;
		GreaterStamTotal.SettingChanged += delegate
		{
			GreaterStamCustom.m_staminaOverTime = GreaterStamTotal.Value;
		};
		GreaterStamDuration.SettingChanged += delegate
		{
			GreaterStamCustom.m_staminaOverTimeDuration = GreaterStamDuration.Value;
		};
		GreaterStamCooldown.SettingChanged += delegate
		{
			((StatusEffect)GreaterStamCustom).m_ttl = GreaterStamCooldown.Value;
		};
		SE_Rested RestedCustom = Cache.GetPrefab<SE_Rested>("SM_Rested");
		((StatusEffect)RestedCustom).m_ttl = RestedDuration.Value;
		RestedDuration.SettingChanged += delegate
		{
			((StatusEffect)RestedCustom).m_ttl = RestedDuration.Value;
		};
		StatusEffect SoftDeath = Cache.GetPrefab<StatusEffect>("SM_Soft_Death");
		SoftDeath.m_ttl = SoftDeathDuration.Value;
		SoftDeathDuration.SettingChanged += delegate
		{
			SoftDeath.m_ttl = SoftDeathDuration.Value;
		};
		StatusEffect QuickDry = Cache.GetPrefab<StatusEffect>("SM_Quick_Dry");
		QuickDry.m_ttl = QuickDryDuration.Value;
		QuickDryDuration.SettingChanged += delegate
		{
			QuickDry.m_ttl = QuickDryDuration.Value;
		};
		SE_Stats XPBuffCustom = Cache.GetPrefab<SE_Stats>("SM_Exp_Buff");
		((StatusEffect)XPBuffCustom).m_ttl = ExpBuffDuration.Value;
		XPBuffCustom.m_raiseSkillModifier = ExpBuffMultiplier.Value;
		ExpBuffDuration.SettingChanged += delegate
		{
			((StatusEffect)XPBuffCustom).m_ttl = ExpBuffDuration.Value;
		};
		ExpBuffMultiplier.SettingChanged += delegate
		{
			XPBuffCustom.m_raiseSkillModifier = ExpBuffMultiplier.Value;
		};
		StatusEffect FastAttackCustom = Cache.GetPrefab<StatusEffect>("SM_Fast_Attack");
		FastAttackCustom.m_ttl = FastAttackDuration.Value;
		faSpeed = FastAttackSpeed.Value;
		FastAttackDuration.SettingChanged += delegate
		{
			FastAttackCustom.m_ttl = FastAttackDuration.Value;
		};
		FastAttackSpeed.SettingChanged += delegate
		{
			faSpeed = FastAttackSpeed.Value;
		};
		SE_Stats SpeedBuffCustom = Cache.GetPrefab<SE_Stats>("SM_Speed_Buff");
		((StatusEffect)SpeedBuffCustom).m_ttl = SpeedBuffDuration.Value;
		SpeedBuffCustom.m_speedModifier = SpeedBuffMovementSpeed.Value;
		swimSpeed = SpeedBuffSwimSpeed.Value;
		SpeedBuffDuration.SettingChanged += delegate
		{
			((StatusEffect)SpeedBuffCustom).m_ttl = SpeedBuffDuration.Value;
		};
		SpeedBuffMovementSpeed.SettingChanged += delegate
		{
			SpeedBuffCustom.m_speedModifier = SpeedBuffMovementSpeed.Value;
		};
		SpeedBuffSwimSpeed.SettingChanged += delegate
		{
			swimSpeed = SpeedBuffSwimSpeed.Value;
		};
		StatusEffect TeleportCustom = Cache.GetPrefab<StatusEffect>("SM_Teleport_Anything");
		TeleportCustom.m_ttl = TeleportDuration.Value;
		TeleportDuration.SettingChanged += delegate
		{
			TeleportCustom.m_ttl = TeleportDuration.Value;
		};
		StatusEffect PotionCooldownCustom = Cache.GetPrefab<StatusEffect>("SM_Potion_Cooldown");
		PotionCooldownCustom.m_ttl = PotionCooldownDuration.Value;
		PotionCooldownDuration.SettingChanged += delegate
		{
			PotionCooldownCustom.m_ttl = PotionCooldownDuration.Value;
		};
		SE_Stats SilentCustom = Cache.GetPrefab<SE_Stats>("SM_Noise_Reduction");
		((StatusEffect)SilentCustom).m_ttl = SilentDuration.Value;
		SilentDuration.SettingChanged += delegate
		{
			((StatusEffect)SilentCustom).m_ttl = SilentDuration.Value;
		};
		SE_Stats EitrCustom = Cache.GetPrefab<SE_Stats>("SM_Linger_Eitr");
		((StatusEffect)EitrCustom).m_ttl = EitrDuration.Value;
		EitrDuration.SettingChanged += delegate
		{
			((StatusEffect)EitrCustom).m_ttl = EitrDuration.Value;
		};
		EitrCustom.m_eitrRegenMultiplier = EitrAmount.Value;
		EitrAmount.SettingChanged += delegate
		{
			EitrCustom.m_eitrRegenMultiplier = EitrAmount.Value;
		};
	}

	private void addMeads()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Expected O, but got Unknown
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Expected O, but got Unknown
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Expected O, but got Unknown
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Expected O, but got Unknown
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e5: Expected O, but got Unknown
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Expected O, but got Unknown
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: Expected O, but got Unknown
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_0157: Expected O, but got Unknown
		//IL_0176: Unknown result type (might be due to invalid IL or missing references)
		//IL_017d: Expected O, but got Unknown
		//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ab: Expected O, but got Unknown
		//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c1: Expected O, but got Unknown
		//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d7: Expected O, but got Unknown
		//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ed: Expected O, but got Unknown
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Expected O, but got Unknown
		//IL_020f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0219: Expected O, but got Unknown
		//IL_0225: Unknown result type (might be due to invalid IL or missing references)
		//IL_022f: Expected O, but got Unknown
		//IL_023b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0245: Expected O, but got Unknown
		//IL_0251: Unknown result type (might be due to invalid IL or missing references)
		//IL_025b: Expected O, but got Unknown
		//IL_0267: Unknown result type (might be due to invalid IL or missing references)
		//IL_0271: Expected O, but got Unknown
		//IL_027d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0287: Expected O, but got Unknown
		try
		{
			CustomItem val = new CustomItem(GreaterHealth, true);
			ItemManager.Instance.AddItem(val);
			items.Add(val);
			CustomItem val2 = new CustomItem(GreaterStamina, true);
			ItemManager.Instance.AddItem(val2);
			items.Add(val2);
			CustomItem val3 = new CustomItem(SpeedBuff, true);
			ItemManager.Instance.AddItem(val3);
			items.Add(val3);
			CustomItem val4 = new CustomItem(RestedBuff, true);
			ItemManager.Instance.AddItem(val4);
			items.Add(val4);
			CustomItem val5 = new CustomItem(ExpBuff, true);
			ItemManager.Instance.AddItem(val5);
			items.Add(val5);
			CustomItem val6 = new CustomItem(NoSkillDrainBuff, true);
			ItemManager.Instance.AddItem(val6);
			items.Add(val6);
			CustomItem val7 = new CustomItem(TeleportAnythingBuff, true);
			ItemManager.Instance.AddItem(val7);
			items.Add(val7);
			CustomItem val8 = new CustomItem(WarmBuff, true);
			ItemManager.Instance.AddItem(val8);
			items.Add(val8);
			CustomItem val9 = new CustomItem(FastAttackBuff, true);
			ItemManager.Instance.AddItem(val9);
			items.Add(val9);
			CustomItem val10 = new CustomItem(SilentBuff, true);
			ItemManager.Instance.AddItem(val10);
			items.Add(val10);
			CustomItem val11 = new CustomItem(LingerEitr, true);
			ItemManager.Instance.AddItem(val11);
			items.Add(val11);
			ItemManager.Instance.AddItem(new CustomItem(BaseGreaterHealth, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseGreaterStamina, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseExpBuff, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseSpeedBuff, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseNoSkillDrain, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseRestedBuff, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseTeleportAnything, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseWarmBuff, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseFastAttackBuff, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseSilentBuff, true));
			ItemManager.Instance.AddItem(new CustomItem(BaseLingerEitr, true));
		}
		catch (Exception arg)
		{
			((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding meads: {arg}");
		}
	}

	private void DoRendering()
	{
		PrefabManager.OnPrefabsRegistered -= DoRendering;
		foreach (CustomItem item in items)
		{
			((MonoBehaviour)this).StartCoroutine(RenderItems(item));
		}
	}

	private static IEnumerator RenderItems(CustomItem item)
	{
		yield return null;
		item.ItemDrop.m_itemData.m_shared.m_icons[0] = RenderManager.Instance.Render(new RenderRequest(item.ItemPrefab)
		{
			Width = 64,
			Height = 64,
			Rotation = RenderManager.IsometricRotation * Quaternion.Euler(0f, -90f, 0f)
		});
	}

	private void addRecipes()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Expected O, but got Unknown
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Expected O, but got Unknown
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Expected O, but got Unknown
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Expected O, but got Unknown
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Expected O, but got Unknown
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Expected O, but got Unknown
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Expected O, but got Unknown
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Expected O, but got Unknown
		//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Expected O, but got Unknown
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: Expected O, but got Unknown
		//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Expected O, but got Unknown
		//IL_010b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0115: Expected O, but got Unknown
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Expected O, but got Unknown
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_013c: Expected O, but got Unknown
		//IL_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_014c: Expected O, but got Unknown
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0153: Expected O, but got Unknown
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_017d: Expected O, but got Unknown
		//IL_0186: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Expected O, but got Unknown
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Expected O, but got Unknown
		//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b3: Expected O, but got Unknown
		//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Expected O, but got Unknown
		//IL_01da: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e4: Expected O, but got Unknown
		//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f8: Expected O, but got Unknown
		//IL_0201: Unknown result type (might be due to invalid IL or missing references)
		//IL_020b: Expected O, but got Unknown
		//IL_0211: Unknown result type (might be due to invalid IL or missing references)
		//IL_021b: Expected O, but got Unknown
		//IL_021c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0222: Expected O, but got Unknown
		//IL_0242: Unknown result type (might be due to invalid IL or missing references)
		//IL_024c: Expected O, but got Unknown
		//IL_0256: Unknown result type (might be due to invalid IL or missing references)
		//IL_0260: Expected O, but got Unknown
		//IL_026a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0274: Expected O, but got Unknown
		//IL_027e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0288: Expected O, but got Unknown
		//IL_028e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0298: Expected O, but got Unknown
		//IL_0299: Unknown result type (might be due to invalid IL or missing references)
		//IL_029f: Expected O, but got Unknown
		//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c9: Expected O, but got Unknown
		//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dd: Expected O, but got Unknown
		//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f1: Expected O, but got Unknown
		//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0304: Expected O, but got Unknown
		//IL_030a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0314: Expected O, but got Unknown
		//IL_0315: Unknown result type (might be due to invalid IL or missing references)
		//IL_031b: Expected O, but got Unknown
		//IL_033b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0345: Expected O, but got Unknown
		//IL_034f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0359: Expected O, but got Unknown
		//IL_0363: Unknown result type (might be due to invalid IL or missing references)
		//IL_036d: Expected O, but got Unknown
		//IL_0373: Unknown result type (might be due to invalid IL or missing references)
		//IL_037d: Expected O, but got Unknown
		//IL_037e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0384: Expected O, but got Unknown
		//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ae: Expected O, but got Unknown
		//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c2: Expected O, but got Unknown
		//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d5: Expected O, but got Unknown
		//IL_03db: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e5: Expected O, but got Unknown
		//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ec: Expected O, but got Unknown
		//IL_040c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0416: Expected O, but got Unknown
		//IL_0420: Unknown result type (might be due to invalid IL or missing references)
		//IL_042a: Expected O, but got Unknown
		//IL_0434: Unknown result type (might be due to invalid IL or missing references)
		//IL_043e: Expected O, but got Unknown
		//IL_0447: Unknown result type (might be due to invalid IL or missing references)
		//IL_0451: Expected O, but got Unknown
		//IL_0457: Unknown result type (might be due to invalid IL or missing references)
		//IL_0461: Expected O, but got Unknown
		//IL_0462: Unknown result type (might be due to invalid IL or missing references)
		//IL_0468: Expected O, but got Unknown
		//IL_0488: Unknown result type (might be due to invalid IL or missing references)
		//IL_0492: Expected O, but got Unknown
		//IL_049c: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a6: Expected O, but got Unknown
		//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ba: Expected O, but got Unknown
		//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ce: Expected O, but got Unknown
		//IL_04d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_04de: Expected O, but got Unknown
		RecipeConfig val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_greaterhealth";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Bloodbag", 10, 0, false));
		val.AddRequirement(new RequirementConfig("Onion", 10, 0, false));
		val.AddRequirement(new RequirementConfig("FreezeGland", 6, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_greaterstamina";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("MushroomYellow", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Cloudberry", 10, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_speed";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("WolfFang", 10, 0, false));
		val.AddRequirement(new RequirementConfig("Thunderstone", 5, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_fast_attack";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Thunderstone", 5, 0, false));
		val.AddRequirement(new RequirementConfig("HardAntler", 2, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_exp";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Thistle", 10, 0, false));
		val.AddRequirement(new RequirementConfig("YmirRemains", 5, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_rested";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Mushroom", 10, 0, false));
		val.AddRequirement(new RequirementConfig("Thistle", 10, 0, false));
		val.AddRequirement(new RequirementConfig("FishRaw", 10, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_teleport";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("GreydwarfEye", 10, 0, false));
		val.AddRequirement(new RequirementConfig("SurtlingCore", 10, 0, false));
		val.AddRequirement(new RequirementConfig("Chitin", 5, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_skilldrain";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Amber", 20, 0, false));
		val.AddRequirement(new RequirementConfig("WitheredBone", 10, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_warm";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Coal", 10, 0, false));
		val.AddRequirement(new RequirementConfig("TrophySurtling", 1, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_silent";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("Feathers", 10, 0, false));
		val.AddRequirement(new RequirementConfig("DeerHide", 10, 0, false));
		val.AddRequirement(new RequirementConfig("TrollHide", 5, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
		val = new RecipeConfig();
		val.CraftingStation = "piece_cauldron";
		val.Item = "sm_base_eitr";
		val.AddRequirement(new RequirementConfig("Honey", 20, 0, false));
		val.AddRequirement(new RequirementConfig("MushroomMagecap", 10, 0, false));
		val.AddRequirement(new RequirementConfig("Cloudberry", 10, 0, false));
		val.AddRequirement(new RequirementConfig("RoyalJelly", 10, 0, false));
		ItemManager.Instance.AddRecipe(new CustomRecipe(val));
	}

	public void addFermenting()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Expected O, but got Unknown
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Expected O, but got Unknown
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Expected O, but got Unknown
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Expected O, but got Unknown
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Expected O, but got Unknown
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cf: Expected O, but got Unknown
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Expected O, but got Unknown
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Expected O, but got Unknown
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_010a: Expected O, but got Unknown
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0137: Expected O, but got Unknown
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: Expected O, but got Unknown
		//IL_0161: Unknown result type (might be due to invalid IL or missing references)
		//IL_016b: Expected O, but got Unknown
		//IL_016c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: Expected O, but got Unknown
		//IL_0195: Unknown result type (might be due to invalid IL or missing references)
		//IL_019f: Expected O, but got Unknown
		//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a6: Expected O, but got Unknown
		//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d3: Expected O, but got Unknown
		//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01da: Expected O, but got Unknown
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0207: Expected O, but got Unknown
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_020e: Expected O, but got Unknown
		//IL_0231: Unknown result type (might be due to invalid IL or missing references)
		//IL_023b: Expected O, but got Unknown
		FermenterConversionConfig val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_greater_health";
		((ConversionConfig)val).FromItem = "sm_base_greaterhealth";
		val.ProducedItems = 6;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_greater_stamina";
		((ConversionConfig)val).FromItem = "sm_base_greaterstamina";
		val.ProducedItems = 6;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_speed_buff";
		((ConversionConfig)val).FromItem = "sm_base_speed";
		val.ProducedItems = 4;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_fast_attack_buff";
		((ConversionConfig)val).FromItem = "sm_base_fast_attack";
		val.ProducedItems = 4;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_exp_buff";
		((ConversionConfig)val).FromItem = "sm_base_exp";
		val.ProducedItems = 4;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_rested_buff";
		((ConversionConfig)val).FromItem = "sm_base_rested";
		val.ProducedItems = 4;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_teleport_anything";
		((ConversionConfig)val).FromItem = "sm_base_teleport";
		val.ProducedItems = 4;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_silent";
		((ConversionConfig)val).FromItem = "sm_base_silent";
		val.ProducedItems = 6;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_no_skill_buff";
		((ConversionConfig)val).FromItem = "sm_base_skilldrain";
		val.ProducedItems = 4;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_warm_buff";
		((ConversionConfig)val).FromItem = "sm_base_warm";
		val.ProducedItems = 4;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
		val = new FermenterConversionConfig();
		((ConversionConfig)val).ToItem = "sm_linger_eitr";
		((ConversionConfig)val).FromItem = "sm_base_eitr";
		val.ProducedItems = 6;
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val));
	}

	private void addLocalizations()
	{
		translate = LocalizationManager.Instance.GetLocalization();
		CustomLocalization obj = translate;
		string text = "English";
		obj.AddTranslation(ref text, new Dictionary<string, string>
		{
			{ "sm_teleport_anything", "Miner's Delight Mead" },
			{ "sm_teleport_anything_description", "Use portals even if you are carrying non-teleportable items like ore and dragon eggs." },
			{ "sm_speed_buff", "Speedy Retreat Mead" },
			{ "sm_speed_buff_description", "Get a burst of speed to cover large distances quickly or out-run anything that chases you, even in water." },
			{ "sm_rested_buff", "Comforts of Home" },
			{ "sm_rested_buff_description", "Take the comforts of home with you wherever you go!" },
			{ "sm_no_skill_buff", "Cheat Death Mead" },
			{ "sm_no_skill_buff_description", "No need to lose all the skills you possess. Only lasts 2 minutes so its best taken before walking into a bad idea." },
			{ "sm_greater_stamina", "Greater Stamina Mead" },
			{ "sm_greater_stamina_description", "When you're in a bind and need that quick fix!" },
			{ "sm_greater_health", "Lingering Health Mead" },
			{ "sm_greater_health_description", "You're not dead yet. Take a swig and get back in there. RAWR!" },
			{ "sm_exp_buff", "Skills Growth Mead" },
			{ "sm_exp_buff_description", "You gain greater insight and able to hone your skills much faster." },
			{ "sm_warm_buff", "Quick Dry Mead" },
			{ "sm_warm_buff_description", "This mead warms you up just enough to get dry!" },
			{ "sm_fast_attack_buff", "Fast Attack Mead" },
			{ "sm_fast_attack_description", "Whether you need to mine it fast or kill it quick, this mead will do the trick." },
			{ "sm_silent", "Silent But Deadly Mead" },
			{ "sm_silent_description", "It's those quiet ones that cause the most damage. With this, you will make no noise, allowing you to move, mine and chop in peace. Also effective for back-stabbing." },
			{ "sm_linger_eitr", "Lingering Eitr Mead" },
			{ "sm_linger_eitr_description", "Need. More. Magic." },
			{ "item_meadbaseteleport", "Mead Base, Miner's Delight" },
			{ "item_meadbasespeed", "Mead Base, Speedy Retreat" },
			{ "item_meadbaseskilldrain", "Mead Base, Cheat Death" },
			{ "item_meadbaserested", "Mead Base, Comforts of Home" },
			{ "item_meadbasegreaterstamina", "Mead Base, Greater Stamina" },
			{ "item_meadbasegreaterhealth", "Mead Base, Lingering Health" },
			{ "item_meadbaseexp", "Mead Base, Skills Growth" },
			{ "item_meadbasewarm", "Mead Base, Quick Dry" },
			{ "item_meadbasefastattack", "Mead Base, Fast Attack" },
			{ "item_meadbasesilent", "Mead Base, Silent But Deadly" },
			{ "item_meadbaselingereitr", "Mead Base, Lingering Eitr" },
			{ "sm_teleport_anything_effect", "Miner's Delight" },
			{ "sm_teleport_anything_tooltip", "Teleport even if you carry non-teleportable items." },
			{ "sm_stamina_greater_effect", "Greater Stamina" },
			{ "sm_greater_stamina_effect_tooltip", "Regenerates stamina fast." },
			{ "sm_speed_buff_effect", "Speed" },
			{ "sm_speed_buff_effect_tooltip", "Increases movement and swim speed for a short time." },
			{ "sm_health_greater_effect", "Lingering Health" },
			{
				"sm_greater_health_effect_tooltip",
				"Restores " + GreaterHealthTotal.Value + " health every 10 seconds for " + GreaterHealthDuration.Value + " seconds."
			},
			{ "sm_exp_buff_effect", "Skills Growth" },
			{ "sm_exp_effect_tooltip", "Increases the amount of experience earned for skills." },
			{ "sm_softdeath_effect", "Cheat Death" },
			{ "sm_fire_effect", "Quick Dry" },
			{ "sm_fire_tooltip", "Removes Wet effect." },
			{ "sm_fast_attack_effect", "Fast Attack" },
			{ "sm_fast_attack_tooltip", "Increases attack speed, whether with weapon or tool" },
			{ "sm_potion_cooldown_effect", "POTION COOLDOWN" },
			{ "sm_potion_cooldown_tooltip", "You cannot take another utility potion for 2 mins." },
			{ "sm_noise_reduction", "Silent But Deadly" },
			{ "sm_noise_reduction_effect_tooltip", "Elimates noise from movement, mining and chopping trees." },
			{ "se_silent_stop", "You are no longer quiet." },
			{ "sm_linger_eitr_effect", "Lingering Eitr" },
			{ "sm_linger_eitr_effect_tooltip", "Gives a small amount of eitr per tick." }
		});
	}
}