Decompiled source of Historical Arsenals v2.0.0

plugins/Historical_Arsenals.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using ItemManager;
using JetBrains.Annotations;
using LocalizationManager;
using Microsoft.CodeAnalysis;
using PieceManager;
using ServerSync;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
using YamlDotNet.Core.Tokens;
using YamlDotNet.Helpers;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.BufferedDeserialization;
using YamlDotNet.Serialization.BufferedDeserialization.TypeDiscriminators;
using YamlDotNet.Serialization.Converters;
using YamlDotNet.Serialization.EventEmitters;
using YamlDotNet.Serialization.NamingConventions;
using YamlDotNet.Serialization.NodeDeserializers;
using YamlDotNet.Serialization.NodeTypeResolvers;
using YamlDotNet.Serialization.ObjectFactories;
using YamlDotNet.Serialization.ObjectGraphTraversalStrategies;
using YamlDotNet.Serialization.ObjectGraphVisitors;
using YamlDotNet.Serialization.Schemas;
using YamlDotNet.Serialization.TypeInspectors;
using YamlDotNet.Serialization.TypeResolvers;
using YamlDotNet.Serialization.Utilities;
using YamlDotNet.Serialization.ValueDeserializers;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Historical_Arsenals")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("Historical_Arsenals")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4358610B-F3F4-4843-B7AF-98B7BC60DCDE")]
[assembly: AssemblyFileVersion("2.0.0")]
[assembly: AssemblyCompany("Dreanegade")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[<54b38594-642c-4834-bd37-9e0d9505e176>Embedded]
	internal sealed class <54b38594-642c-4834-bd37-9e0d9505e176>EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[<54b38594-642c-4834-bd37-9e0d9505e176>Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class <337c9673-75d3-4cb3-958d-9da5326949c4>NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public <337c9673-75d3-4cb3-958d-9da5326949c4>NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public <337c9673-75d3-4cb3-958d-9da5326949c4>NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[<54b38594-642c-4834-bd37-9e0d9505e176>Embedded]
	[CompilerGenerated]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class <df7b4729-1193-498d-8d8b-6128535eacb1>NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public <df7b4729-1193-498d-8d8b-6128535eacb1>NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace Historical_Arsenals
{
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	[BepInPlugin("Dreanegade.Historical_Arsenals", "Historical_Arsenals", "2.0.0")]
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	public class Historical_ArsenalsPlugin : BaseUnityPlugin
	{
		[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)]
		public enum Toggle
		{
			On = 1,
			Off = 0
		}

		[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)]
		private class ConfigurationManagerAttributes
		{
			[UsedImplicitly]
			public int? Order;

			[UsedImplicitly]
			public bool? Browsable;

			[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
			[UsedImplicitly]
			public string Category;

			[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(new byte[] { 2, 1 })]
			[UsedImplicitly]
			public Action<ConfigEntryBase> CustomDrawer;
		}

		internal const string ModName = "Historical_Arsenals";

		internal const string ModVersion = "2.0.0";

		internal const string Author = "Dreanegade";

		private const string ModGUID = "Dreanegade.Historical_Arsenals";

		private static string ConfigFileName = "Dreanegade.Historical_Arsenals.cfg";

		private static string ConfigFileFullPath;

		internal static string ConnectionError;

		private readonly Harmony _harmony = new Harmony("Dreanegade.Historical_Arsenals");

		public static readonly ManualLogSource Historical_ArsenalsLogger;

		private static readonly ConfigSync ConfigSync;

		private static ConfigEntry<Toggle> _serverConfigLocked;

		private static ConfigEntry<Toggle> _recipeIsActiveConfig;

		public void Awake()
		{
			Localizer.Load();
			_serverConfigLocked = config("1 - General", "Lock Configuration", Toggle.On, "If on, the configuration is locked and can be changed by server admins only.");
			ConfigSync.AddLockingConfigEntry<Toggle>(_serverConfigLocked);
			AssetBundle assets = PrefabManager.RegisterAssetBundle("historical_arsenals");
			BuildPiece.ConfigurationEnabled = true;
			PrefabManager.RegisterPrefab(assets, "projectile_bashrad_knife_throwing_DO");
			PrefabManager.RegisterPrefab(assets, "vfx_bashrad_knife_throwing_hit_DO");
			PrefabManager.RegisterPrefab(assets, "sfx_bashrad_knife_throwing_fire_DO");
			PrefabManager.RegisterPrefab(assets, "sfx_bashrad_sword_swing_DO");
			PrefabManager.RegisterPrefab(assets, "projectile_plague_bomb_DO");
			PrefabManager.RegisterPrefab(assets, "aoe_plague_bomb_heal_DO");
			PrefabManager.RegisterPrefab(assets, "aoe_plague_bomb_poison_DO");
			PrefabManager.RegisterPrefab(assets, "vfx_plague_bomb_heal_swirl_DO");
			PrefabManager.RegisterPrefab(assets, "sfx_plague_bomb_throw_DO");
			PrefabManager.RegisterPrefab(assets, "sfx_plague_glass_break_DO");
			BuildPiece buildPiece = new BuildPiece("historical_arsenals", "ForgeOfAgesDO");
			buildPiece.RequiredItems.Add("Bronze", 10, recover: true);
			buildPiece.RequiredItems.Add("Stone", 30, recover: true);
			buildPiece.RequiredItems.Add("BronzeNails", 40, recover: true);
			buildPiece.RequiredItems.Add("Coal", 15, recover: true);
			buildPiece.Category.Set("Distant Origins");
			buildPiece.Crafting.Set(PieceManager.CraftingTable.Forge);
			MaterialReplacer.RegisterGameObjectForShaderSwap(buildPiece.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			BuildPiece buildPiece2 = new BuildPiece("historical_arsenals", "ForgeOfAgesExt1DO");
			buildPiece2.RequiredItems.Add("Wood", 15, recover: true);
			buildPiece2.RequiredItems.Add("Bronze", 3, recover: true);
			buildPiece2.RequiredItems.Add("BookSmithingDO", 1, recover: true);
			buildPiece2.Category.Set("Distant Origins");
			MaterialReplacer.RegisterGameObjectForShaderSwap(buildPiece2.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			BuildPiece buildPiece3 = new BuildPiece("historical_arsenals", "ForgeOfAgesExt2DO");
			buildPiece3.RequiredItems.Add("RoundLog", 15, recover: true);
			buildPiece3.RequiredItems.Add("Iron", 8, recover: true);
			buildPiece3.RequiredItems.Add("IronNails", 20, recover: true);
			buildPiece3.Category.Set("Distant Origins");
			MaterialReplacer.RegisterGameObjectForShaderSwap(buildPiece3.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			BuildPiece buildPiece4 = new BuildPiece("historical_arsenals", "ForgeOfAgesExt3DO");
			buildPiece4.RequiredItems.Add("WoodResinDO", 10, recover: true);
			buildPiece4.RequiredItems.Add("Silver", 8, recover: true);
			buildPiece4.RequiredItems.Add("FittingsSilverDO", 10, recover: true);
			buildPiece4.Category.Set("Distant Origins");
			MaterialReplacer.RegisterGameObjectForShaderSwap(buildPiece4.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			BuildPiece buildPiece5 = new BuildPiece("historical_arsenals", "ForgeOfAgesExt4DO");
			buildPiece5.RequiredItems.Add("WoodTarDO", 8, recover: true);
			buildPiece5.RequiredItems.Add("BlackMetal", 16, recover: true);
			buildPiece5.RequiredItems.Add("FittingsIronDO", 10, recover: true);
			buildPiece5.Category.Set("Distant Origins");
			MaterialReplacer.RegisterGameObjectForShaderSwap(buildPiece5.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			BuildPiece buildPiece6 = new BuildPiece("historical_arsenals", "ForgeOfAgesExt5DO");
			buildPiece6.RequiredItems.Add("YggdrasilWood", 20, recover: true);
			buildPiece6.RequiredItems.Add("LinenThread", 14, recover: true);
			buildPiece6.RequiredItems.Add("Iron", 4, recover: true);
			buildPiece6.Category.Set("Distant Origins");
			MaterialReplacer.RegisterGameObjectForShaderSwap(buildPiece6.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			BuildPiece buildPiece7 = new BuildPiece("historical_arsenals", "ForgeOfAgesExt6DO");
			buildPiece7.RequiredItems.Add("FlametalNew", 8, recover: true);
			buildPiece7.RequiredItems.Add("LinenThread", 12, recover: true);
			buildPiece7.RequiredItems.Add("FittingsFlametalDO", 20, recover: true);
			buildPiece7.Category.Set("Distant Origins");
			MaterialReplacer.RegisterGameObjectForShaderSwap(buildPiece7.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			Item item = new Item("historical_arsenals", "BookSmithingDO");
			item.Trade.RequiredGlobalKey = "defeated_eikthyr";
			item.Trade.Trader = Trader.Haldor;
			item.Trade.Price = 100u;
			item.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Book Smithing", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item2 = new Item("historical_arsenals", "WoodResinDO");
			item2.Crafting.Add("ForgeOfAgesDO", 1);
			item2.RequiredItems.Add("Wood", 1);
			item2.RequiredItems.Add("Resin", 1);
			item2.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item2.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Wood Resin", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item2.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item3 = new Item("historical_arsenals", "WoodTarDO");
			item3.Crafting.Add("ForgeOfAgesDO", 1);
			item3.RequiredItems.Add("FineWood", 1);
			item3.RequiredItems.Add("Tar", 1);
			item3.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item3.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Wood Tar", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item3.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item4 = new Item("historical_arsenals", "FittingsBronzeDO");
			item4.Crafting.Add("ForgeOfAgesDO", 1);
			item4.RequiredItems.Add("Bronze", 1);
			item4.CraftAmount = 5;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item4.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Fittings Bronze", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item4.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item5 = new Item("historical_arsenals", "FittingsIronDO");
			item5.Crafting.Add("ForgeOfAgesDO", 1);
			item5.RequiredItems.Add("Iron", 1);
			item5.CraftAmount = 5;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item5.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Fittings Iron", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item5.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item6 = new Item("historical_arsenals", "FittingsSilverDO");
			item6.Crafting.Add("ForgeOfAgesDO", 1);
			item6.RequiredItems.Add("Silver", 1);
			item6.CraftAmount = 5;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item6.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Fittings Silver", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item6.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item7 = new Item("historical_arsenals", "FittingsBlackmetalDO");
			item7.Crafting.Add("ForgeOfAgesDO", 1);
			item7.RequiredItems.Add("BlackMetal", 1);
			item7.CraftAmount = 5;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item7.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Fittings Black Metal", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item7.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item8 = new Item("historical_arsenals", "FittingsFlametalDO");
			item8.Crafting.Add("ForgeOfAgesDO", 1);
			item8.RequiredItems.Add("FlametalNew", 1);
			item8.CraftAmount = 5;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item8.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Fittings Flametal", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item8.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item9 = new Item("historical_arsenals", "ArmorBashradChestDO");
			item9.Crafting.Add("ForgeOfAgesDO", 1);
			item9.RequiredItems.Add("Bronze", 6);
			item9.RequiredItems.Add("DeerHide", 3);
			item9.RequiredItems.Add("FittingsBronzeDO", 10);
			item9.RequiredUpgradeItems.Add("Bronze", 3);
			item9.RequiredUpgradeItems.Add("DeerHide", 1);
			item9.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item9.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Bashrad Chest", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item9.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item10 = new Item("historical_arsenals", "ArmorBashradLegsDO");
			item10.Crafting.Add("ForgeOfAgesDO", 1);
			item10.RequiredItems.Add("Bronze", 6);
			item10.RequiredItems.Add("DeerHide", 3);
			item10.RequiredItems.Add("FittingsBronzeDO", 10);
			item10.RequiredUpgradeItems.Add("Bronze", 3);
			item10.RequiredUpgradeItems.Add("DeerHide", 1);
			item10.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item10.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Bashrad Legs", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item10.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item11 = new Item("historical_arsenals", "ArmorBashradHelmetDO");
			item11.Crafting.Add("ForgeOfAgesDO", 1);
			item11.RequiredItems.Add("Bronze", 6);
			item11.RequiredItems.Add("DeerHide", 3);
			item11.RequiredItems.Add("FittingsBronzeDO", 10);
			item11.RequiredUpgradeItems.Add("Bronze", 3);
			item11.RequiredUpgradeItems.Add("DeerHide", 1);
			item11.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item11.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Bashrad Helmet", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item11.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item12 = new Item("historical_arsenals", "ArmorBashradCapeDO");
			item12.Crafting.Add("ForgeOfAgesDO", 1);
			item12.RequiredItems.Add("DeerHide", 7);
			item12.RequiredItems.Add("LeatherScraps", 6);
			item12.RequiredItems.Add("FittingsBronzeDO", 5);
			item12.RequiredUpgradeItems.Add("DeerHide", 4);
			item12.RequiredUpgradeItems.Add("LeatherScraps", 4);
			item12.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item12.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Bashrad Cape", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item12.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item13 = new Item("historical_arsenals", "ArmorBashradBeltDO");
			item13.Crafting.Add("ForgeOfAgesDO", 1);
			item13.RequiredItems.Add("SwordDualBashradDO", 1);
			item13.RequiredItems.Add("Bronze", 5);
			item13.RequiredItems.Add("DeerHide", 6);
			item13.RequiredItems.Add("FittingsBronzeDO", 15);
			item13.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item13.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Bashrad Belt", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item13.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item14 = new Item("historical_arsenals", "ArmorCrusaderChestDO");
			item14.Crafting.Add("ForgeOfAgesDO", 1);
			item14.RequiredItems.Add("Iron", 22);
			item14.RequiredItems.Add("TrollHide", 3);
			item14.RequiredItems.Add("FittingsIronDO", 15);
			item14.RequiredUpgradeItems.Add("Iron", 6);
			item14.RequiredUpgradeItems.Add("TrollHide", 1);
			item14.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item14.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Crusader Chest", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item14.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item15 = new Item("historical_arsenals", "ArmorCrusaderLegsDO");
			item15.Crafting.Add("ForgeOfAgesDO", 1);
			item15.RequiredItems.Add("Iron", 22);
			item15.RequiredItems.Add("TrollHide", 3);
			item15.RequiredItems.Add("FittingsIronDO", 15);
			item15.RequiredUpgradeItems.Add("Iron", 6);
			item15.RequiredUpgradeItems.Add("TrollHide", 1);
			item15.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item15.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Crusader Legs", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item15.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item16 = new Item("historical_arsenals", "ArmorCrusaderHelmetDO");
			item16.Crafting.Add("ForgeOfAgesDO", 1);
			item16.RequiredItems.Add("Iron", 22);
			item16.RequiredItems.Add("TrollHide", 3);
			item16.RequiredItems.Add("FittingsIronDO", 15);
			item16.RequiredUpgradeItems.Add("Iron", 6);
			item16.RequiredUpgradeItems.Add("TrollHide", 1);
			item16.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item16.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Crusader Helmet", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item16.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item17 = new Item("historical_arsenals", "ArmorCrusaderCapeDO");
			item17.Crafting.Add("ForgeOfAgesDO", 1);
			item17.RequiredItems.Add("TrollHide", 8);
			item17.RequiredItems.Add("DeerHide", 2);
			item17.RequiredItems.Add("FittingsIronDO", 20);
			item17.RequiredUpgradeItems.Add("TrollHide", 4);
			item17.RequiredUpgradeItems.Add("DeerHide", 1);
			item17.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item17.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Crusader Cape", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item17.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item18 = new Item("historical_arsenals", "ArmorCrusaderBeltDO");
			item18.Crafting.Add("ForgeOfAgesDO", 1);
			item18.RequiredItems.Add("SwordCrusaderDO", 1);
			item18.RequiredItems.Add("Iron", 5);
			item18.RequiredItems.Add("TrollHide", 10);
			item18.RequiredItems.Add("FittingsIronDO", 20);
			item18.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item18.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Crusader Belt", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item18.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item19 = new Item("historical_arsenals", "ArmorGunjangChestDO");
			item19.Crafting.Add("ForgeOfAgesDO", 2);
			item19.RequiredItems.Add("Silver", 18);
			item19.RequiredItems.Add("WolfPelt", 10);
			item19.RequiredItems.Add("FittingsSilverDO", 20);
			item19.RequiredUpgradeItems.Add("Silver", 4);
			item19.RequiredUpgradeItems.Add("WolfPelt", 3);
			item19.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item19.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Gunjang Chest", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item19.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item20 = new Item("historical_arsenals", "ArmorGunjangLegsDO");
			item20.Crafting.Add("ForgeOfAgesDO", 2);
			item20.RequiredItems.Add("Silver", 18);
			item20.RequiredItems.Add("WolfPelt", 10);
			item20.RequiredItems.Add("FittingsSilverDO", 20);
			item20.RequiredUpgradeItems.Add("Silver", 4);
			item20.RequiredUpgradeItems.Add("WolfPelt", 3);
			item20.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item20.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Gunjang Legs", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item20.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item21 = new Item("historical_arsenals", "ArmorGunjangHelmetDO");
			item21.Crafting.Add("ForgeOfAgesDO", 2);
			item21.RequiredItems.Add("Silver", 18);
			item21.RequiredItems.Add("WolfPelt", 10);
			item21.RequiredItems.Add("Obsidian", 6);
			item21.RequiredItems.Add("FittingsSilverDO", 20);
			item21.RequiredUpgradeItems.Add("Silver", 4);
			item21.RequiredUpgradeItems.Add("WolfPelt", 3);
			item21.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item21.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Gunjang Helmet", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item21.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item22 = new Item("historical_arsenals", "ArmorGunjangCapeDO");
			item22.Crafting.Add("ForgeOfAgesDO", 2);
			item22.RequiredItems.Add("Silver", 10);
			item22.RequiredItems.Add("WolfPelt", 4);
			item22.RequiredItems.Add("FittingsSilverDO", 25);
			item22.RequiredUpgradeItems.Add("Silver", 4);
			item22.RequiredUpgradeItems.Add("WolfPelt", 2);
			item22.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item22.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Gunjang Cape", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item22.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item23 = new Item("historical_arsenals", "ArmorGunjangBeltDO");
			item23.Crafting.Add("ForgeOfAgesDO", 2);
			item23.RequiredItems.Add("SwordGunjangSamingeomDO", 1);
			item23.RequiredItems.Add("Silver", 6);
			item23.RequiredItems.Add("WolfPelt", 12);
			item23.RequiredItems.Add("FittingsSilverDO", 15);
			item23.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item23.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Gunjang Belt", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item23.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item24 = new Item("historical_arsenals", "ArmorDaoweiChestDO");
			item24.Crafting.Add("ForgeOfAgesDO", 3);
			item24.RequiredItems.Add("BlackMetal", 25);
			item24.RequiredItems.Add("LinenThread", 20);
			item24.RequiredItems.Add("FittingsBlackmetalDO", 30);
			item24.RequiredUpgradeItems.Add("BlackMetal", 10);
			item24.RequiredUpgradeItems.Add("LinenThread", 10);
			item24.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item24.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Daowei Chest", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item24.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item25 = new Item("historical_arsenals", "ArmorDaoweiLegsDO");
			item25.Crafting.Add("ForgeOfAgesDO", 3);
			item25.RequiredItems.Add("BlackMetal", 25);
			item25.RequiredItems.Add("LinenThread", 20);
			item25.RequiredItems.Add("FittingsBlackmetalDO", 30);
			item25.RequiredUpgradeItems.Add("BlackMetal", 10);
			item25.RequiredUpgradeItems.Add("LinenThread", 10);
			item25.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item25.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Daowei Legs", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item25.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item26 = new Item("historical_arsenals", "ArmorDaoweiHelmetDO");
			item26.Crafting.Add("ForgeOfAgesDO", 3);
			item26.RequiredItems.Add("BlackMetal", 25);
			item26.RequiredItems.Add("LinenThread", 20);
			item26.RequiredItems.Add("Feathers", 2);
			item26.RequiredItems.Add("FittingsBlackmetalDO", 30);
			item26.RequiredUpgradeItems.Add("BlackMetal", 10);
			item26.RequiredUpgradeItems.Add("LinenThread", 10);
			item26.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item26.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Daowei Helmet", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item26.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item27 = new Item("historical_arsenals", "ArmorDaoweiCapeDO");
			item27.Crafting.Add("ForgeOfAgesDO", 3);
			item27.RequiredItems.Add("LoxPelt", 10);
			item27.RequiredItems.Add("LinenThread", 10);
			item27.RequiredItems.Add("FittingsBlackmetalDO", 15);
			item27.RequiredUpgradeItems.Add("LoxPelt", 4);
			item27.RequiredUpgradeItems.Add("LinenThread", 5);
			item27.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item27.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Daowei Cape", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item27.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item28 = new Item("historical_arsenals", "ArmorDaoweiBeltDO");
			item28.Crafting.Add("ForgeOfAgesDO", 3);
			item28.RequiredItems.Add("SwordDaoweiJianDO", 1);
			item28.RequiredItems.Add("BlackMetal", 15);
			item28.RequiredItems.Add("LinenThread", 30);
			item28.RequiredItems.Add("FittingsBlackmetalDO", 30);
			item28.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item28.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Daowei Belt", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item28.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item29 = new Item("historical_arsenals", "ArmorShogunChestDO");
			item29.Crafting.Add("ForgeOfAgesDO", 4);
			item29.RequiredItems.Add("FlametalNew", 22);
			item29.RequiredItems.Add("LinenThread", 20);
			item29.RequiredItems.Add("ScaleHide", 4);
			item29.RequiredItems.Add("FittingsFlametalDO", 20);
			item29.RequiredUpgradeItems.Add("FlametalNew", 10);
			item29.RequiredUpgradeItems.Add("LinenThread", 10);
			item29.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item29.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shogun Chest", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item29.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item30 = new Item("historical_arsenals", "ArmorShogunLegsDO");
			item30.Crafting.Add("ForgeOfAgesDO", 4);
			item30.RequiredItems.Add("FlametalNew", 22);
			item30.RequiredItems.Add("LinenThread", 20);
			item30.RequiredItems.Add("ScaleHide", 4);
			item30.RequiredItems.Add("FittingsFlametalDO", 20);
			item30.RequiredUpgradeItems.Add("FlametalNew", 10);
			item30.RequiredUpgradeItems.Add("LinenThread", 10);
			item30.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item30.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shogun Legs", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item30.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item31 = new Item("historical_arsenals", "ArmorShogunHelmetDO");
			item31.Crafting.Add("ForgeOfAgesDO", 4);
			item31.RequiredItems.Add("FlametalNew", 22);
			item31.RequiredItems.Add("LinenThread", 20);
			item31.RequiredItems.Add("HardAntler", 2);
			item31.RequiredItems.Add("FittingsFlametalDO", 20);
			item31.RequiredUpgradeItems.Add("FlametalNew", 10);
			item31.RequiredUpgradeItems.Add("LinenThread", 10);
			item31.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item31.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shogun Helmet", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item31.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item32 = new Item("historical_arsenals", "ArmorShogunCapeDO");
			item32.Crafting.Add("ForgeOfAgesDO", 4);
			item32.RequiredItems.Add("FlametalNew", 8);
			item32.RequiredItems.Add("ScaleHide", 6);
			item32.RequiredItems.Add("FittingsFlametalDO", 10);
			item32.RequiredUpgradeItems.Add("FlametalNew", 1);
			item32.RequiredUpgradeItems.Add("ScaleHide", 3);
			item32.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item32.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shogun Cape", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item32.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item33 = new Item("historical_arsenals", "ArmorShogunBeltDO");
			item33.Crafting.Add("ForgeOfAgesDO", 4);
			item33.RequiredItems.Add("BastardShogunKatanaDO", 1);
			item33.RequiredItems.Add("SwordShogunWakizashiDO", 1);
			item33.RequiredItems.Add("LinenThread", 15);
			item33.RequiredItems.Add("FittingsFlametalDO", 30);
			item33.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item33.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shogun Belt", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item33.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item34 = new Item("historical_arsenals", "ArmorPlagueChestDO");
			item34.Crafting.Add("ForgeOfAgesDO", 1);
			item34.RequiredItems.Add("TrollHide", 10);
			item34.RequiredItems.Add("LeatherScraps", 10);
			item34.RequiredItems.Add("FittingsIronDO", 25);
			item34.RequiredUpgradeItems.Add("TrollHide", 5);
			item34.RequiredUpgradeItems.Add("LeatherScraps", 5);
			item34.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item34.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Doctor Chest", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item34.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item35 = new Item("historical_arsenals", "ArmorPlagueLegsDO");
			item35.Crafting.Add("ForgeOfAgesDO", 1);
			item35.RequiredItems.Add("TrollHide", 10);
			item35.RequiredItems.Add("LeatherScraps", 10);
			item35.RequiredItems.Add("FittingsIronDO", 25);
			item35.RequiredUpgradeItems.Add("TrollHide", 5);
			item35.RequiredUpgradeItems.Add("LeatherScraps", 5);
			item35.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item35.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Doctor Legs", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item35.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item36 = new Item("historical_arsenals", "ArmorPlagueHelmetDO");
			item36.Crafting.Add("ForgeOfAgesDO", 1);
			item36.RequiredItems.Add("TrollHide", 10);
			item36.RequiredItems.Add("LeatherScraps", 10);
			item36.RequiredItems.Add("Ruby", 2);
			item36.RequiredItems.Add("FittingsIronDO", 25);
			item36.RequiredUpgradeItems.Add("TrollHide", 5);
			item36.RequiredUpgradeItems.Add("LeatherScraps", 5);
			item36.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item36.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Doctor Helmet", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item36.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item37 = new Item("historical_arsenals", "ArmorPlagueCapeDO");
			item37.Crafting.Add("ForgeOfAgesDO", 1);
			item37.RequiredItems.Add("TrollHide", 6);
			item37.RequiredItems.Add("LeatherScraps", 6);
			item37.RequiredItems.Add("FittingsIronDO", 15);
			item37.RequiredUpgradeItems.Add("TrollHide", 3);
			item37.RequiredUpgradeItems.Add("LeatherScraps", 3);
			item37.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item37.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Doctor Cape", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item37.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item38 = new Item("historical_arsenals", "ArmorPlagueBeltDO");
			item38.Crafting.Add("ForgeOfAgesDO", 1);
			item38.RequiredItems.Add("MeadPoisonResist", 13);
			item38.RequiredItems.Add("MushroomYellow", 20);
			item38.RequiredItems.Add("LeatherScraps", 10);
			item38.RequiredItems.Add("FittingsIronDO", 30);
			item38.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item38.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Doctor Belt", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item38.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item39 = new Item("historical_arsenals", "AxeBashradTabarzinDO");
			item39.Crafting.Add("ForgeOfAgesDO", 1);
			item39.RequiredItems.Add("Bronze", 12);
			item39.RequiredItems.Add("FittingsBronzeDO", 10);
			item39.RequiredUpgradeItems.Add("Bronze", 6);
			item39.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item39.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Axe Bashrad Tabarzin", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item39.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item40 = new Item("historical_arsenals", "SwordBashradZanfarDO");
			item40.Crafting.Add("ForgeOfAgesDO", 1);
			item40.RequiredItems.Add("Bronze", 10);
			item40.RequiredItems.Add("Ruby", 1);
			item40.RequiredItems.Add("FittingsBronzeDO", 10);
			item40.RequiredUpgradeItems.Add("Bronze", 5);
			item40.RequiredUpgradeItems.Add("Ruby", 1);
			item40.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item40.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Sword Bashrad Zanfar", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item40.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item41 = new Item("historical_arsenals", "SwordDualBashradDO");
			item41.Crafting.Add("ForgeOfAgesDO", 1);
			item41.RequiredItems.Add("Bronze", 14);
			item41.RequiredItems.Add("WoodResinDO", 4);
			item41.RequiredItems.Add("FittingsBronzeDO", 10);
			item41.RequiredUpgradeItems.Add("Bronze", 7);
			item41.RequiredUpgradeItems.Add("WoodResinDO", 2);
			item41.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item41.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Sword Dual Bashrad", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item41.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item42 = new Item("historical_arsenals", "DaggerBashradDO");
			item42.Crafting.Add("ForgeOfAgesDO", 1);
			item42.RequiredItems.Add("Bronze", 10);
			item42.RequiredItems.Add("BoneFragments", 6);
			item42.RequiredItems.Add("FittingsBronzeDO", 10);
			item42.RequiredUpgradeItems.Add("Bronze", 5);
			item42.RequiredUpgradeItems.Add("BoneFragments", 3);
			item42.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item42.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Dagger Bashrad", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item42.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item43 = new Item("historical_arsenals", "DaggerDualBashradDO");
			item43.Crafting.Add("ForgeOfAgesDO", 1);
			item43.RequiredItems.Add("Bronze", 12);
			item43.RequiredItems.Add("WoodResinDO", 6);
			item43.RequiredItems.Add("Ruby", 2);
			item43.RequiredItems.Add("FittingsBronzeDO", 10);
			item43.RequiredUpgradeItems.Add("Bronze", 6);
			item43.RequiredUpgradeItems.Add("WoodResinDO", 3);
			item43.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item43.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Dagger Dual Bashrad", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item43.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item44 = new Item("historical_arsenals", "ShieldBashradDO");
			item44.Crafting.Add("ForgeOfAgesDO", 1);
			item44.RequiredItems.Add("Bronze", 14);
			item44.RequiredItems.Add("FittingsBronzeDO", 10);
			item44.RequiredUpgradeItems.Add("Bronze", 7);
			item44.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item44.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shield Bashrad", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item44.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item45 = new Item("historical_arsenals", "ShieldDaggerBashradDO");
			item45.Crafting.Add("ForgeOfAgesDO", 1);
			item45.RequiredItems.Add("Bronze", 10);
			item45.RequiredItems.Add("WoodResinDO", 4);
			item45.RequiredItems.Add("FittingsBronzeDO", 10);
			item45.RequiredUpgradeItems.Add("Bronze", 5);
			item45.RequiredUpgradeItems.Add("WoodResinDO", 2);
			item45.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item45.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shield Dagger Bashrad", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item45.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item46 = new Item("historical_arsenals", "ThrowingKnifeBashradDO");
			item46.Crafting.Add("ForgeOfAgesDO", 1);
			item46.RequiredItems.Add("Bronze", 1);
			item46.RequiredItems.Add("WoodResinDO", 6);
			item46.RequiredItems.Add("AncientSeed", 1);
			item46.CraftAmount = 100;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item46.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Throwing Knife Bashrad", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item46.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item47 = new Item("historical_arsenals", "SwordCrusaderDO");
			item47.Crafting.Add("ForgeOfAgesDO", 1);
			item47.RequiredItems.Add("Iron", 22);
			item47.RequiredItems.Add("WoodResinDO", 6);
			item47.RequiredItems.Add("FittingsIronDO", 15);
			item47.RequiredUpgradeItems.Add("Iron", 11);
			item47.RequiredUpgradeItems.Add("WoodResinDO", 3);
			item47.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item47.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Sword Crusader", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item47.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item48 = new Item("historical_arsenals", "MaceCrusaderBecDO");
			item48.Crafting.Add("ForgeOfAgesDO", 1);
			item48.RequiredItems.Add("Iron", 20);
			item48.RequiredItems.Add("WoodResinDO", 10);
			item48.RequiredItems.Add("FittingsIronDO", 15);
			item48.RequiredUpgradeItems.Add("Iron", 10);
			item48.RequiredUpgradeItems.Add("WoodResinDO", 5);
			item48.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item48.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Mace Crusader Bec", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item48.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item49 = new Item("historical_arsenals", "MaceCrusaderMorgensternDO");
			item49.Crafting.Add("ForgeOfAgesDO", 1);
			item49.RequiredItems.Add("Iron", 20);
			item49.RequiredItems.Add("WoodResinDO", 10);
			item49.RequiredItems.Add("IronNails", 30);
			item49.RequiredUpgradeItems.Add("Iron", 10);
			item49.RequiredUpgradeItems.Add("WoodResinDO", 5);
			item49.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item49.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Mace Crusader Morgenstern", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item49.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item50 = new Item("historical_arsenals", "AtgeirCrusaderHalberdDO");
			item50.Crafting.Add("ForgeOfAgesDO", 1);
			item50.RequiredItems.Add("Iron", 34);
			item50.RequiredItems.Add("WoodResinDO", 12);
			item50.RequiredItems.Add("FittingsIronDO", 10);
			item50.RequiredUpgradeItems.Add("Iron", 15);
			item50.RequiredUpgradeItems.Add("WoodResinDO", 6);
			item50.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item50.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Atgeir Crusader Halberd", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item50.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item51 = new Item("historical_arsenals", "BastardCrusaderDO");
			item51.Crafting.Add("ForgeOfAgesDO", 1);
			item51.RequiredItems.Add("Iron", 32);
			item51.RequiredItems.Add("WoodResinDO", 6);
			item51.RequiredItems.Add("FittingsIronDO", 15);
			item51.RequiredUpgradeItems.Add("Iron", 15);
			item51.RequiredUpgradeItems.Add("WoodResinDO", 3);
			item51.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item51.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Sword Crusader", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item51.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item52 = new Item("historical_arsenals", "BattleAxeCrusaderDO");
			item52.Crafting.Add("ForgeOfAgesDO", 1);
			item52.RequiredItems.Add("Iron", 34);
			item52.RequiredItems.Add("WoodResinDO", 12);
			item52.RequiredItems.Add("FittingsIronDO", 10);
			item52.RequiredUpgradeItems.Add("Iron", 15);
			item52.RequiredUpgradeItems.Add("WoodResinDO", 6);
			item52.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item52.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Axe Crusader", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item52.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item53 = new Item("historical_arsenals", "AxeCrusaderDO");
			item53.Crafting.Add("ForgeOfAgesDO", 1);
			item53.RequiredItems.Add("Iron", 22);
			item53.RequiredItems.Add("WoodResinDO", 10);
			item53.RequiredItems.Add("FittingsIronDO", 15);
			item53.RequiredUpgradeItems.Add("Iron", 11);
			item53.RequiredUpgradeItems.Add("WoodResinDO", 5);
			item53.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item53.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Axe Crusader", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item53.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item54 = new Item("historical_arsenals", "DaggerCrusaderDO");
			item54.Crafting.Add("ForgeOfAgesDO", 1);
			item54.RequiredItems.Add("Iron", 16);
			item54.RequiredItems.Add("LeatherScraps", 4);
			item54.RequiredItems.Add("FittingsIronDO", 15);
			item54.RequiredUpgradeItems.Add("Iron", 8);
			item54.RequiredUpgradeItems.Add("LeatherScraps", 2);
			item54.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item54.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Dagger Crusader", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item54.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item55 = new Item("historical_arsenals", "ShieldTowerCrusaderDO");
			item55.Crafting.Add("ForgeOfAgesDO", 1);
			item55.RequiredItems.Add("Iron", 15);
			item55.RequiredItems.Add("WoodResinDO", 10);
			item55.RequiredItems.Add("FittingsIronDO", 15);
			item55.RequiredUpgradeItems.Add("Iron", 5);
			item55.RequiredUpgradeItems.Add("WoodResinDO", 5);
			item55.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item55.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Tower Shield Crusader", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item55.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item56 = new Item("historical_arsenals", "BastardGunjangDO");
			item56.Crafting.Add("ForgeOfAgesDO", 2);
			item56.RequiredItems.Add("Silver", 32);
			item56.RequiredItems.Add("WoodResinDO", 12);
			item56.RequiredItems.Add("FittingsSilverDO", 15);
			item56.RequiredUpgradeItems.Add("Silver", 16);
			item56.RequiredUpgradeItems.Add("WoodResinDO", 6);
			item56.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item56.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Sword Gunjang", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item56.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item57 = new Item("historical_arsenals", "CrossbowGunjangDO");
			item57.Crafting.Add("ForgeOfAgesDO", 2);
			item57.RequiredItems.Add("BowGunjangDO", 1);
			item57.RequiredItems.Add("WoodResinDO", 30);
			item57.RequiredItems.Add("FittingsSilverDO", 10);
			item57.RequiredUpgradeItems.Add("Silver", 5);
			item57.RequiredUpgradeItems.Add("WoodResinDO", 15);
			item57.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item57.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Crossbow Gunjang", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item57.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item58 = new Item("historical_arsenals", "BowGunjangDO");
			item58.Crafting.Add("ForgeOfAgesDO", 2);
			item58.RequiredItems.Add("WoodResinDO", 15);
			item58.RequiredItems.Add("Silver", 10);
			item58.RequiredItems.Add("FittingsSilverDO", 15);
			item58.RequiredUpgradeItems.Add("Silver", 5);
			item58.RequiredUpgradeItems.Add("WoodResinDO", 7);
			item58.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item58.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Bow Gunjang", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item58.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item59 = new Item("historical_arsenals", "SwordGunjangHwandoDO");
			item59.Crafting.Add("ForgeOfAgesDO", 2);
			item59.RequiredItems.Add("Silver", 30);
			item59.RequiredItems.Add("WoodResinDO", 8);
			item59.RequiredItems.Add("FittingsSilverDO", 15);
			item59.RequiredUpgradeItems.Add("Silver", 15);
			item59.RequiredUpgradeItems.Add("WoodResinDO", 4);
			item59.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item59.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Sword Gunjang Hwando", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item59.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item60 = new Item("historical_arsenals", "SwordGunjangSamingeomDO");
			item60.Crafting.Add("ForgeOfAgesDO", 2);
			item60.RequiredItems.Add("Silver", 26);
			item60.RequiredItems.Add("WoodResinDO", 8);
			item60.RequiredItems.Add("FittingsSilverDO", 20);
			item60.RequiredUpgradeItems.Add("Silver", 13);
			item60.RequiredUpgradeItems.Add("WoodResinDO", 4);
			item60.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item60.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Sword Gunjang Samingeom", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item60.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item61 = new Item("historical_arsenals", "AtgeirGunjangDO");
			item61.Crafting.Add("ForgeOfAgesDO", 2);
			item61.RequiredItems.Add("Silver", 30);
			item61.RequiredItems.Add("WoodResinDO", 12);
			item61.RequiredItems.Add("FittingsSilverDO", 15);
			item61.RequiredUpgradeItems.Add("Silver", 15);
			item61.RequiredUpgradeItems.Add("WoodResinDO", 6);
			item61.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item61.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Atgeir Gunjang", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item61.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item62 = new Item("historical_arsenals", "SwordDaoweiJianDO");
			item62.Crafting.Add("ForgeOfAgesDO", 3);
			item62.RequiredItems.Add("BlackMetal", 26);
			item62.RequiredItems.Add("WoodTarDO", 6);
			item62.RequiredItems.Add("LinenThread", 6);
			item62.RequiredItems.Add("FittingsBlackmetalDO", 20);
			item62.RequiredUpgradeItems.Add("BlackMetal", 13);
			item62.RequiredUpgradeItems.Add("LinenThread", 6);
			item62.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item62.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Sword Daowei Jian", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item62.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item63 = new Item("historical_arsenals", "AtgeirDaoweiGuandaoDO");
			item63.Crafting.Add("ForgeOfAgesDO", 3);
			item63.RequiredItems.Add("BlackMetal", 34);
			item63.RequiredItems.Add("WoodTarDO", 10);
			item63.RequiredItems.Add("LinenThread", 6);
			item63.RequiredItems.Add("FittingsBlackmetalDO", 20);
			item63.RequiredUpgradeItems.Add("BlackMetal", 17);
			item63.RequiredUpgradeItems.Add("LinenThread", 6);
			item63.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item63.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Atgeir Daowei Guandao", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item63.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item64 = new Item("historical_arsenals", "AtgeirDaoweiHalberdDO");
			item64.Crafting.Add("ForgeOfAgesDO", 3);
			item64.RequiredItems.Add("BlackMetal", 32);
			item64.RequiredItems.Add("WoodTarDO", 10);
			item64.RequiredItems.Add("LinenThread", 10);
			item64.RequiredItems.Add("FittingsBlackmetalDO", 20);
			item64.RequiredUpgradeItems.Add("BlackMetal", 16);
			item64.RequiredUpgradeItems.Add("LinenThread", 6);
			item64.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item64.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Atgeir Daowei Halberd", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item64.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item65 = new Item("historical_arsenals", "BastardDaoweiDO");
			item65.Crafting.Add("ForgeOfAgesDO", 3);
			item65.RequiredItems.Add("BlackMetal", 32);
			item65.RequiredItems.Add("WoodTarDO", 6);
			item65.RequiredItems.Add("LinenThread", 6);
			item65.RequiredItems.Add("FittingsBlackmetalDO", 20);
			item65.RequiredUpgradeItems.Add("BlackMetal", 16);
			item65.RequiredUpgradeItems.Add("LinenThread", 6);
			item65.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item65.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Sword Daowei", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item65.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item66 = new Item("historical_arsenals", "BattleAxeDaoweiDO");
			item66.Crafting.Add("ForgeOfAgesDO", 3);
			item66.RequiredItems.Add("BlackMetal", 36);
			item66.RequiredItems.Add("LinenThread", 8);
			item66.RequiredItems.Add("FittingsBlackmetalDO", 20);
			item66.RequiredUpgradeItems.Add("BlackMetal", 18);
			item66.RequiredUpgradeItems.Add("LinenThread", 5);
			item66.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item66.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Axe Daowei", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item66.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item67 = new Item("historical_arsenals", "MaceDaoweiDO");
			item67.Crafting.Add("ForgeOfAgesDO", 3);
			item67.RequiredItems.Add("BlackMetal", 26);
			item67.RequiredItems.Add("WoodTarDO", 6);
			item67.RequiredItems.Add("LinenThread", 6);
			item67.RequiredItems.Add("FittingsBlackmetalDO", 20);
			item67.RequiredUpgradeItems.Add("BlackMetal", 13);
			item67.RequiredUpgradeItems.Add("LinenThread", 6);
			item67.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item67.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Mace Daowei", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item67.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item68 = new Item("historical_arsenals", "MaceDualDaoweiDO");
			item68.Crafting.Add("ForgeOfAgesDO", 3);
			item68.RequiredItems.Add("BlackMetal", 34);
			item68.RequiredItems.Add("WoodTarDO", 8);
			item68.RequiredItems.Add("LinenThread", 8);
			item68.RequiredItems.Add("FittingsBlackmetalDO", 20);
			item68.RequiredUpgradeItems.Add("BlackMetal", 17);
			item68.RequiredUpgradeItems.Add("LinenThread", 8);
			item68.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item68.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Dual Maces Daowei", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item68.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item69 = new Item("historical_arsenals", "ShieldDaoweiDO");
			item69.Crafting.Add("ForgeOfAgesDO", 3);
			item69.RequiredItems.Add("BlackMetal", 10);
			item69.RequiredItems.Add("WoodTarDO", 10);
			item69.RequiredItems.Add("LinenThread", 10);
			item69.RequiredItems.Add("FittingsBlackmetalDO", 1);
			item69.RequiredUpgradeItems.Add("BlackMetal", 5);
			item69.RequiredUpgradeItems.Add("LinenThread", 5);
			item69.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item69.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Shield Daowei", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item69.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item70 = new Item("historical_arsenals", "SwordDualShogunDaishoDO");
			item70.Crafting.Add("ForgeOfAgesDO", 4);
			item70.RequiredItems.Add("FlametalNew", 35);
			item70.RequiredItems.Add("WoodTarDO", 8);
			item70.RequiredItems.Add("AskHide", 6);
			item70.RequiredItems.Add("FittingsFlametalDO", 15);
			item70.RequiredUpgradeItems.Add("FlametalNew", 15);
			item70.RequiredUpgradeItems.Add("AskHide", 3);
			item70.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item70.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Dual Sword Shogun Daisho", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item70.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item71 = new Item("historical_arsenals", "BastardShogunKatanaDO");
			item71.Crafting.Add("ForgeOfAgesDO", 4);
			item71.RequiredItems.Add("FlametalNew", 25);
			item71.RequiredItems.Add("WoodTarDO", 6);
			item71.RequiredItems.Add("AskHide", 4);
			item71.RequiredItems.Add("FittingsFlametalDO", 15);
			item71.RequiredUpgradeItems.Add("FlametalNew", 15);
			item71.RequiredUpgradeItems.Add("AskHide", 2);
			item71.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item71.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Sword Shogun Katana", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item71.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item72 = new Item("historical_arsenals", "AtgeirShogunNaginataDO");
			item72.Crafting.Add("ForgeOfAgesDO", 4);
			item72.RequiredItems.Add("FlametalNew", 15);
			item72.RequiredItems.Add("WoodTarDO", 10);
			item72.RequiredItems.Add("AskHide", 4);
			item72.RequiredItems.Add("FittingsFlametalDO", 15);
			item72.RequiredUpgradeItems.Add("FlametalNew", 10);
			item72.RequiredUpgradeItems.Add("AskHide", 2);
			item72.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item72.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Atgeir Shogun Naginata", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item72.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item73 = new Item("historical_arsenals", "BattleMaceShogunKanaboDO");
			item73.Crafting.Add("ForgeOfAgesDO", 4);
			item73.RequiredItems.Add("FlametalNew", 10);
			item73.RequiredItems.Add("WoodTarDO", 16);
			item73.RequiredItems.Add("AskHide", 4);
			item73.RequiredItems.Add("FittingsFlametalDO", 15);
			item73.RequiredUpgradeItems.Add("FlametalNew", 5);
			item73.RequiredUpgradeItems.Add("WoodTarDO", 8);
			item73.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item73.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Club Shogun Kanabo", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item73.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item74 = new Item("historical_arsenals", "BowShogunYumiDO");
			item74.Crafting.Add("ForgeOfAgesDO", 4);
			item74.RequiredItems.Add("FlametalNew", 15);
			item74.RequiredItems.Add("WoodTarDO", 10);
			item74.RequiredItems.Add("AskHide", 4);
			item74.RequiredItems.Add("FittingsFlametalDO", 15);
			item74.RequiredUpgradeItems.Add("FlametalNew", 10);
			item74.RequiredUpgradeItems.Add("WoodTarDO", 5);
			item74.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item74.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Bow Shogun Yumi", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item74.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item75 = new Item("historical_arsenals", "SwordShogunWakizashiDO");
			item75.Crafting.Add("ForgeOfAgesDO", 4);
			item75.RequiredItems.Add("FlametalNew", 15);
			item75.RequiredItems.Add("WoodTarDO", 4);
			item75.RequiredItems.Add("AskHide", 4);
			item75.RequiredItems.Add("FittingsFlametalDO", 15);
			item75.RequiredUpgradeItems.Add("FlametalNew", 10);
			item75.RequiredUpgradeItems.Add("AskHide", 2);
			item75.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item75.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Sword Shogun Wakizashi", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item75.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item76 = new Item("historical_arsenals", "DaggerShogunTantoDO");
			item76.Crafting.Add("ForgeOfAgesDO", 4);
			item76.RequiredItems.Add("FlametalNew", 10);
			item76.RequiredItems.Add("WoodTarDO", 4);
			item76.RequiredItems.Add("AskHide", 4);
			item76.RequiredItems.Add("FittingsFlametalDO", 15);
			item76.RequiredUpgradeItems.Add("FlametalNew", 5);
			item76.RequiredUpgradeItems.Add("AskHide", 2);
			item76.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item76.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Dagger Shogun Tanto", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item76.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item77 = new Item("historical_arsenals", "AtgeirShogunYariDO");
			item77.Crafting.Add("ForgeOfAgesDO", 4);
			item77.RequiredItems.Add("FlametalNew", 15);
			item77.RequiredItems.Add("WoodTarDO", 10);
			item77.RequiredItems.Add("AskHide", 4);
			item77.RequiredItems.Add("FittingsFlametalDO", 15);
			item77.RequiredUpgradeItems.Add("FlametalNew", 10);
			item77.RequiredUpgradeItems.Add("AskHide", 2);
			item77.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item77.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Atgeir Shogun Yari", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item77.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item78 = new Item("historical_arsenals", "BastardShogunNagamakiDO");
			item78.Crafting.Add("ForgeOfAgesDO", 4);
			item78.RequiredItems.Add("FlametalNew", 35);
			item78.RequiredItems.Add("WoodTarDO", 8);
			item78.RequiredItems.Add("AskHide", 6);
			item78.RequiredItems.Add("FittingsFlametalDO", 15);
			item78.RequiredUpgradeItems.Add("FlametalNew", 15);
			item78.RequiredUpgradeItems.Add("AskHide", 3);
			item78.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item78.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("2H Sword Shogun Nagamaki", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item78.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item79 = new Item("historical_arsenals", "DaggerPlagueSyringeDO");
			item79.Crafting.Add("ForgeOfAgesDO", 1);
			item79.RequiredItems.Add("Iron", 14);
			item79.RequiredItems.Add("Guck", 12);
			item79.RequiredItems.Add("FittingsIronDO", 15);
			item79.RequiredUpgradeItems.Add("Iron", 7);
			item79.RequiredUpgradeItems.Add("Guck", 6);
			item79.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item79.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Dagger Syringe", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item79.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item80 = new Item("historical_arsenals", "SwordPlagueCrowDO");
			item80.Crafting.Add("ForgeOfAgesDO", 1);
			item80.RequiredItems.Add("Iron", 24);
			item80.RequiredItems.Add("FittingsIronDO", 15);
			item80.RequiredUpgradeItems.Add("Iron", 12);
			item80.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item80.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Sword", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item80.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item81 = new Item("historical_arsenals", "DaggerPlagueScalpelDO");
			item81.Crafting.Add("ForgeOfAgesDO", 1);
			item81.RequiredItems.Add("Iron", 18);
			item81.RequiredItems.Add("FittingsIronDO", 15);
			item81.RequiredUpgradeItems.Add("Iron", 9);
			item81.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item81.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Dagger Scalpel", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item81.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item82 = new Item("historical_arsenals", "AxePlagueCleaverDO");
			item82.Crafting.Add("ForgeOfAgesDO", 1);
			item82.RequiredItems.Add("Iron", 22);
			item82.RequiredItems.Add("WoodResinDO", 6);
			item82.RequiredItems.Add("FittingsIronDO", 15);
			item82.RequiredUpgradeItems.Add("Iron", 11);
			item82.RequiredUpgradeItems.Add("WoodResinDO", 3);
			item82.CraftAmount = 1;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item82.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Axe Cleaver", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item82.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Item item83 = new Item("historical_arsenals", "BombPlagueDO");
			item83.Crafting.Add("ForgeOfAgesDO", 1);
			item83.RequiredItems.Add("Ooze", 4);
			item83.RequiredItems.Add("MushroomYellow", 5);
			item83.RequiredItems.Add("Thistle", 6);
			item83.CraftAmount = 20;
			MaterialReplacer.RegisterGameObjectForShaderSwap(item83.Prefab, MaterialReplacer.ShaderType.UseUnityShader);
			_recipeIsActiveConfig = config("Plague Bomb Heal", "IsRecipeEnabled", Toggle.On, "Determines if the recipe is enabled for this prefab");
			item83.RecipeIsActive = (ConfigEntryBase)(object)_recipeIsActiveConfig;
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			_harmony.PatchAll(executingAssembly);
			SetupWatcher();
		}

		private void OnDestroy()
		{
			((BaseUnityPlugin)this).Config.Save();
		}

		private void SetupWatcher()
		{
			FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(Paths.ConfigPath, ConfigFileName);
			fileSystemWatcher.Changed += ReadConfigValues;
			fileSystemWatcher.Created += ReadConfigValues;
			fileSystemWatcher.Renamed += ReadConfigValues;
			fileSystemWatcher.IncludeSubdirectories = true;
			fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject;
			fileSystemWatcher.EnableRaisingEvents = true;
		}

		private void ReadConfigValues(object sender, FileSystemEventArgs e)
		{
			if (!File.Exists(ConfigFileFullPath))
			{
				return;
			}
			try
			{
				Historical_ArsenalsLogger.LogDebug((object)"ReadConfigValues called");
				((BaseUnityPlugin)this).Config.Reload();
			}
			catch
			{
				Historical_ArsenalsLogger.LogError((object)("There was an issue loading your " + ConfigFileName));
				Historical_ArsenalsLogger.LogError((object)"Please check your config entries for spelling and format!");
			}
		}

		private ConfigEntry<T> config<[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)] T>(string group, string name, T value, ConfigDescription description, bool synchronizedSetting = true)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			ConfigDescription val = new ConfigDescription(description.Description + (synchronizedSetting ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags);
			ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val);
			ConfigSync.AddConfigEntry<T>(val2).SynchronizedConfig = synchronizedSetting;
			return val2;
		}

		private ConfigEntry<T> config<[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)] T>(string group, string name, T value, string description, bool synchronizedSetting = true)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			return config(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()), synchronizedSetting);
		}

		static Historical_ArsenalsPlugin()
		{
			string configPath = Paths.ConfigPath;
			char directorySeparatorChar = Path.DirectorySeparatorChar;
			ConfigFileFullPath = configPath + directorySeparatorChar + ConfigFileName;
			ConnectionError = "";
			Historical_ArsenalsLogger = Logger.CreateLogSource("Historical_Arsenals");
			ConfigSync = new ConfigSync("Dreanegade.Historical_Arsenals")
			{
				DisplayName = "Historical_Arsenals",
				CurrentVersion = "2.0.0",
				MinimumRequiredVersion = "2.0.0"
			};
			_serverConfigLocked = null;
			_recipeIsActiveConfig = null;
		}
	}
	public static class KeyboardExtensions
	{
		public static bool IsKeyDown(this KeyboardShortcut shortcut)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			if ((int)((KeyboardShortcut)(ref shortcut)).MainKey != 0 && Input.GetKeyDown(((KeyboardShortcut)(ref shortcut)).MainKey))
			{
				return ((KeyboardShortcut)(ref shortcut)).Modifiers.All((Func<KeyCode, bool>)Input.GetKey);
			}
			return false;
		}

		public static bool IsKeyHeld(this KeyboardShortcut shortcut)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			if ((int)((KeyboardShortcut)(ref shortcut)).MainKey != 0 && Input.GetKey(((KeyboardShortcut)(ref shortcut)).MainKey))
			{
				return ((KeyboardShortcut)(ref shortcut)).Modifiers.All((Func<KeyCode, bool>)Input.GetKey);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(ZNet), "OnNewConnection")]
	public static class RegisterAndCheckVersion
	{
		[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
		private static void Prefix(ZNetPeer peer, ref ZNet __instance)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogDebug((object)"Registering version RPC handler");
			peer.m_rpc.Register<ZPackage>("Historical_Arsenals_VersionCheck", (Action<ZRpc, ZPackage>)RpcHandlers.RPC_Historical_Arsenals_Version);
			Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogInfo((object)"Invoking version check");
			ZPackage val = new ZPackage();
			val.Write("2.0.0");
			peer.m_rpc.Invoke("Historical_Arsenals_VersionCheck", new object[1] { val });
		}
	}
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	[HarmonyPatch(typeof(ZNet), "RPC_PeerInfo")]
	public static class VerifyClient
	{
		private static bool Prefix(ZRpc rpc, ZPackage pkg, ref ZNet __instance)
		{
			if (!__instance.IsServer() || RpcHandlers.ValidatedPeers.Contains(rpc))
			{
				return true;
			}
			Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogWarning((object)("Peer (" + rpc.m_socket.GetHostName() + ") never sent version or couldn't due to previous disconnect, disconnecting"));
			rpc.Invoke("Error", new object[1] { 3 });
			return false;
		}

		private static void Postfix(ZNet __instance)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.instance.GetServerPeerID(), "Historical_ArsenalsRequestAdminSync", new object[1] { (object)new ZPackage() });
		}
	}
	[HarmonyPatch(typeof(FejdStartup), "ShowConnectError")]
	public class ShowConnectionError
	{
		[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
		private static void Postfix(FejdStartup __instance)
		{
			if (__instance.m_connectionFailedPanel.activeSelf)
			{
				__instance.m_connectionFailedError.fontSizeMax = 25f;
				__instance.m_connectionFailedError.fontSizeMin = 15f;
				TMP_Text connectionFailedError = __instance.m_connectionFailedError;
				connectionFailedError.text = connectionFailedError.text + "\n" + Historical_ArsenalsPlugin.ConnectionError;
			}
		}
	}
	[HarmonyPatch(typeof(ZNet), "Disconnect")]
	public static class RemoveDisconnectedPeerFromVerified
	{
		[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
		private static void Prefix(ZNetPeer peer, ref ZNet __instance)
		{
			if (__instance.IsServer())
			{
				Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogInfo((object)("Peer (" + peer.m_rpc.m_socket.GetHostName() + ") disconnected, removing from validated list"));
				RpcHandlers.ValidatedPeers.Remove(peer.m_rpc);
			}
		}
	}
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	public static class RpcHandlers
	{
		public static readonly List<ZRpc> ValidatedPeers = new List<ZRpc>();

		public static void RPC_Historical_Arsenals_Version(ZRpc rpc, ZPackage pkg)
		{
			string text = pkg.ReadString();
			Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogInfo((object)("Version check, local: 2.0.0,  remote: " + text));
			if (text != "2.0.0")
			{
				Historical_ArsenalsPlugin.ConnectionError = "Historical_Arsenals Installed: 2.0.0\n Needed: " + text;
				if (ZNet.instance.IsServer())
				{
					Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogWarning((object)("Peer (" + rpc.m_socket.GetHostName() + ") has incompatible version, disconnecting..."));
					rpc.Invoke("Error", new object[1] { 3 });
				}
			}
			else if (!ZNet.instance.IsServer())
			{
				Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogInfo((object)"Received same version from server!");
			}
			else
			{
				Historical_ArsenalsPlugin.Historical_ArsenalsLogger.LogInfo((object)("Adding peer (" + rpc.m_socket.GetHostName() + ") to validated list"));
				ValidatedPeers.Add(rpc);
			}
		}

		public static string ComputeHashForMod()
		{
			using SHA256 sHA = SHA256.Create();
			byte[] array = sHA.ComputeHash(File.ReadAllBytes(Assembly.GetExecutingAssembly().Location));
			StringBuilder stringBuilder = new StringBuilder();
			byte[] array2 = array;
			foreach (byte b in array2)
			{
				stringBuilder.Append(b.ToString("X2"));
			}
			return stringBuilder.ToString();
		}
	}
}
namespace PieceManager
{
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[PublicAPI]
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	public static class MaterialReplacer
	{
		[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)]
		public enum ShaderType
		{
			PieceShader,
			VegetationShader,
			RockShader,
			RugShader,
			GrassShader,
			CustomCreature,
			UseUnityShader
		}

		private static readonly Dictionary<GameObject, bool> ObjectToSwap;

		private static readonly Dictionary<string, Material> OriginalMaterials;

		private static readonly Dictionary<GameObject, ShaderType> ObjectsForShaderReplace;

		private static readonly HashSet<Shader> CachedShaders;

		private static bool hasRun;

		static MaterialReplacer()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			CachedShaders = new HashSet<Shader>();
			hasRun = false;
			OriginalMaterials = new Dictionary<string, Material>();
			ObjectToSwap = new Dictionary<GameObject, bool>();
			ObjectsForShaderReplace = new Dictionary<GameObject, ShaderType>();
			new Harmony("org.bepinex.helpers.PieceManager").Patch((MethodBase)AccessTools.DeclaredMethod(typeof(ZoneSystem), "Start", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(typeof(MaterialReplacer), "ReplaceAllMaterialsWithOriginal", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		}

		public static void RegisterGameObjectForShaderSwap(GameObject go, ShaderType type)
		{
			if (!ObjectsForShaderReplace.ContainsKey(go))
			{
				ObjectsForShaderReplace.Add(go, type);
			}
		}

		public static void RegisterGameObjectForMatSwap(GameObject go, bool isJotunnMock = false)
		{
			if (!ObjectToSwap.ContainsKey(go))
			{
				ObjectToSwap.Add(go, isJotunnMock);
			}
		}

		private static void GetAllMaterials()
		{
			Material[] array = Resources.FindObjectsOfTypeAll<Material>();
			foreach (Material val in array)
			{
				OriginalMaterials[((Object)val).name] = val;
			}
		}

		[HarmonyPriority(700)]
		private static void ReplaceAllMaterialsWithOriginal()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Invalid comparison between Unknown and I4
			if ((int)SystemInfo.graphicsDeviceType == 4 || hasRun)
			{
				return;
			}
			if (OriginalMaterials.Count == 0)
			{
				GetAllMaterials();
			}
			foreach (KeyValuePair<GameObject, bool> item in ObjectToSwap)
			{
				GameObject key = item.Key;
				bool value = item.Value;
				ProcessGameObjectMaterials(key, value);
			}
			AssetBundle[] array = Resources.FindObjectsOfTypeAll<AssetBundle>();
			foreach (AssetBundle val in array)
			{
				IEnumerable<Shader> enumerable3;
				try
				{
					IEnumerable<Shader> enumerable2;
					if (!val.isStreamedSceneAssetBundle || !Object.op_Implicit((Object)(object)val))
					{
						IEnumerable<Shader> enumerable = val.LoadAllAssets<Shader>();
						enumerable2 = enumerable;
					}
					else
					{
						enumerable2 = from shader in ((IEnumerable<string>)val.GetAllAssetNames()).Select((Func<string, Shader>)val.LoadAsset<Shader>)
							where (Object)(object)shader != (Object)null
							select shader;
					}
					enumerable3 = enumerable2;
				}
				catch (Exception)
				{
					continue;
				}
				if (enumerable3 == null)
				{
					continue;
				}
				foreach (Shader item2 in enumerable3)
				{
					CachedShaders.Add(item2);
				}
			}
			foreach (KeyValuePair<GameObject, ShaderType> item3 in ObjectsForShaderReplace)
			{
				GameObject key2 = item3.Key;
				ShaderType value2 = item3.Value;
				ProcessGameObjectShaders(key2, value2);
			}
			hasRun = true;
		}

		private static void ProcessGameObjectMaterials(GameObject go, bool isJotunnMock)
		{
			Renderer[] componentsInChildren = go.GetComponentsInChildren<Renderer>(true);
			foreach (Renderer obj in componentsInChildren)
			{
				Material[] sharedMaterials = obj.sharedMaterials.Select([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (Material material) => ReplaceMaterial(material, isJotunnMock)).ToArray();
				obj.sharedMaterials = sharedMaterials;
			}
		}

		private static Material ReplaceMaterial(Material originalMaterial, bool isJotunnMock)
		{
			string text = (isJotunnMock ? "JVLmock_" : "_REPLACE_");
			if (!((Object)originalMaterial).name.StartsWith(text, StringComparison.Ordinal))
			{
				return originalMaterial;
			}
			string text2 = ((Object)originalMaterial).name.Replace(" (Instance)", "").Replace(text, "");
			if (OriginalMaterials.TryGetValue(text2, out var value))
			{
				return value;
			}
			Debug.LogWarning((object)("No suitable material found to replace: " + text2));
			return originalMaterial;
		}

		private static void ProcessGameObjectShaders(GameObject go, ShaderType shaderType)
		{
			Renderer[] componentsInChildren = go.GetComponentsInChildren<Renderer>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				Material[] sharedMaterials = componentsInChildren[i].sharedMaterials;
				foreach (Material val in sharedMaterials)
				{
					if ((Object)(object)val != (Object)null)
					{
						val.shader = GetShaderForType(val.shader, shaderType, ((Object)val.shader).name);
					}
				}
			}
		}

		private static Shader GetShaderForType(Shader orig, ShaderType shaderType, string originalShaderName)
		{
			return (Shader)(shaderType switch
			{
				ShaderType.PieceShader => FindShaderWithName(orig, "Custom/Piece"), 
				ShaderType.VegetationShader => FindShaderWithName(orig, "Custom/Vegetation"), 
				ShaderType.RockShader => FindShaderWithName(orig, "Custom/StaticRock"), 
				ShaderType.RugShader => FindShaderWithName(orig, "Custom/Rug"), 
				ShaderType.GrassShader => FindShaderWithName(orig, "Custom/Grass"), 
				ShaderType.CustomCreature => FindShaderWithName(orig, "Custom/Creature"), 
				ShaderType.UseUnityShader => FindShaderWithName(orig, ((Object)(object)FindShaderWithName(orig, originalShaderName) != (Object)null) ? originalShaderName : "ToonDeferredShading2017"), 
				_ => FindShaderWithName(orig, "Standard"), 
			});
		}

		public static Shader FindShaderWithName(Shader origShader, string name)
		{
			foreach (Shader cachedShader in CachedShaders)
			{
				if (((Object)cachedShader).name == name)
				{
					return cachedShader;
				}
			}
			return origShader;
		}
	}
	[PublicAPI]
	public enum CraftingTable
	{
		None,
		[InternalName("piece_workbench")]
		Workbench,
		[InternalName("piece_cauldron")]
		Cauldron,
		[InternalName("forge")]
		Forge,
		[InternalName("piece_artisanstation")]
		ArtisanTable,
		[InternalName("piece_stonecutter")]
		StoneCutter,
		[InternalName("piece_magetable")]
		MageTable,
		[InternalName("blackforge")]
		BlackForge,
		[InternalName("piece_preptable")]
		FoodPreparationTable,
		[InternalName("piece_MeadCauldron")]
		MeadKetill,
		Custom
	}
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	public class InternalName : Attribute
	{
		public readonly string internalName;

		public InternalName(string internalName)
		{
			this.internalName = internalName;
		}
	}
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[PublicAPI]
	public class ExtensionList
	{
		public readonly List<ExtensionConfig> ExtensionStations = new List<ExtensionConfig>();

		public void Set(CraftingTable table, int maxStationDistance = 5)
		{
			ExtensionStations.Add(new ExtensionConfig
			{
				Table = table,
				maxStationDistance = maxStationDistance
			});
		}

		public void Set(string customTable, int maxStationDistance = 5)
		{
			ExtensionStations.Add(new ExtensionConfig
			{
				Table = CraftingTable.Custom,
				custom = customTable,
				maxStationDistance = maxStationDistance
			});
		}
	}
	public struct ExtensionConfig
	{
		public CraftingTable Table;

		public float maxStationDistance;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		public string custom;
	}
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	[PublicAPI]
	public class CraftingStationList
	{
		public readonly List<CraftingStationConfig> Stations = new List<CraftingStationConfig>();

		public void Set(CraftingTable table)
		{
			Stations.Add(new CraftingStationConfig
			{
				Table = table
			});
		}

		public void Set(string customTable)
		{
			Stations.Add(new CraftingStationConfig
			{
				Table = CraftingTable.Custom,
				custom = customTable
			});
		}
	}
	public struct CraftingStationConfig
	{
		public CraftingTable Table;

		public int level;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		public string custom;
	}
	[PublicAPI]
	public enum BuildPieceCategory
	{
		Misc = 0,
		Crafting = 1,
		BuildingWorkbench = 2,
		BuildingStonecutter = 3,
		Furniture = 4,
		All = 100,
		Custom = 99
	}
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[PublicAPI]
	public class RequiredResourcesList
	{
		public readonly List<Requirement> Requirements = new List<Requirement>();

		public void Add(string item, int amount, bool recover)
		{
			Requirements.Add(new Requirement
			{
				itemName = item,
				amount = amount,
				recover = recover
			});
		}
	}
	public struct Requirement
	{
		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(1)]
		public string itemName;

		public int amount;

		public bool recover;
	}
	public struct SpecialProperties
	{
		[Description("Admins should be the only ones that can build this piece.")]
		public bool AdminOnly;

		[Description("Turns off generating a config for this build piece.")]
		public bool NoConfig;
	}
	[PublicAPI]
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	public class BuildingPieceCategory
	{
		public BuildPieceCategory Category;

		public string custom = "";

		public void Set(BuildPieceCategory category)
		{
			Category = category;
		}

		public void Set(string customCategory)
		{
			Category = BuildPieceCategory.Custom;
			custom = customCategory;
		}
	}
	[PublicAPI]
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	public class PieceTool
	{
		public readonly HashSet<string> Tools = new HashSet<string>();

		public void Add(string tool)
		{
			Tools.Add(tool);
		}
	}
	[PublicAPI]
	[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(1)]
	[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
	public class BuildPiece
	{
		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
		internal class PieceConfig
		{
			public ConfigEntry<string> craft;

			public ConfigEntry<BuildPieceCategory> category;

			public ConfigEntry<string> customCategory;

			public ConfigEntry<string> tools;

			public ConfigEntry<CraftingTable> extensionTable;

			public ConfigEntry<string> customExtentionTable;

			public ConfigEntry<float> maxStationDistance;

			public ConfigEntry<CraftingTable> table;

			public ConfigEntry<string> customTable;
		}

		[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)]
		private class ConfigurationManagerAttributes
		{
			[UsedImplicitly]
			public int? Order;

			[UsedImplicitly]
			public bool? Browsable;

			[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
			[UsedImplicitly]
			public string Category;

			[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(new byte[] { 2, 1 })]
			[UsedImplicitly]
			public Action<ConfigEntryBase> CustomDrawer;
		}

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(0)]
		private class SerializedRequirements
		{
			public readonly List<Requirement> Reqs;

			public SerializedRequirements(List<Requirement> reqs)
			{
				Reqs = reqs;
			}

			public SerializedRequirements(string reqs)
			{
				Reqs = reqs.Split(new char[1] { ',' }).Select([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (string r) =>
				{
					string[] array = r.Split(new char[1] { ':' });
					Requirement result = default(Requirement);
					result.itemName = array[0];
					result.amount = ((array.Length <= 1 || !int.TryParse(array[1], out var result2)) ? 1 : result2);
					bool result3 = default(bool);
					result.recover = array.Length <= 2 || !bool.TryParse(array[2], out result3) || result3;
					return result;
				}).ToList();
			}

			public override string ToString()
			{
				return string.Join(",", Reqs.Select([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (Requirement r) => $"{r.itemName}:{r.amount}:{r.recover}"));
			}

			[return: <337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
			public static ItemDrop fetchByName(ObjectDB objectDB, string name)
			{
				GameObject itemPrefab = objectDB.GetItemPrefab(name);
				ItemDrop obj = ((itemPrefab != null) ? itemPrefab.GetComponent<ItemDrop>() : null);
				if ((Object)(object)obj == (Object)null)
				{
					Debug.LogWarning((object)(((!string.IsNullOrWhiteSpace(((Object)plugin).name)) ? ("[" + ((Object)plugin).name + "]") : "") + " The required item '" + name + "' does not exist."));
				}
				return obj;
			}

			public static Requirement[] toPieceReqs(SerializedRequirements craft)
			{
				return craft.Reqs.Where((Requirement r) => r.itemName != "").ToDictionary((Func<Requirement, string>)([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (Requirement r) => r.itemName), (Func<Requirement, Requirement>)([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (Requirement r) =>
				{
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_001d: 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_0031: Expected O, but got Unknown
					ItemDrop val = ResItem(r);
					return (val != null) ? new Requirement
					{
						m_amount = r.amount,
						m_resItem = val,
						m_recover = r.recover
					} : ((Requirement)null);
				})).Values.Where([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (Requirement v) => v != null).ToArray();
				[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(2)]
				static ItemDrop ResItem(Requirement r)
				{
					return fetchByName(ObjectDB.instance, r.itemName);
				}
			}
		}

		internal static readonly List<BuildPiece> registeredPieces = new List<BuildPiece>();

		private static readonly Dictionary<Piece, BuildPiece> pieceMap = new Dictionary<Piece, BuildPiece>();

		internal static Dictionary<BuildPiece, PieceConfig> pieceConfigs = new Dictionary<BuildPiece, PieceConfig>();

		internal List<Conversion> Conversions = new List<Conversion>();

		internal List<ItemConversion> conversions = new List<ItemConversion>();

		[Description("Disables generation of the configs for your pieces. This is global, this turns it off for all pieces in your mod.")]
		public static bool ConfigurationEnabled = true;

		public readonly GameObject Prefab;

		[Description("Specifies the resources needed to craft the piece.\nUse .Add to add resources with their internal ID and an amount.\nUse one .Add for each resource type the building piece should need.")]
		public readonly RequiredResourcesList RequiredItems = new RequiredResourcesList();

		[Description("Sets the category for the building piece.")]
		public readonly BuildingPieceCategory Category = new BuildingPieceCategory();

		[Description("Specifies the tool needed to build your piece.\nUse .Add to add a tool.")]
		public readonly PieceTool Tool = new PieceTool();

		[Description("Specifies the crafting station needed to build your piece.\nUse .Add to add a crafting station, using the CraftingTable enum and a minimum level for the crafting station.")]
		public CraftingStationList Crafting = new CraftingStationList();

		[Description("Makes this piece a station extension")]
		public ExtensionList Extension = new ExtensionList();

		[Description("Change the extended/special properties of your build piece.")]
		public SpecialProperties SpecialProperties;

		[Description("Specifies a config entry which toggles whether a recipe is active.")]
		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		public ConfigEntryBase RecipeIsActive;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		private LocalizeKey _name;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		private LocalizeKey _description;

		internal string[] activeTools;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		private static object configManager;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		private static Localization _english;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		internal static BaseUnityPlugin _plugin = null;

		private static bool hasConfigSync = true;

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		private static object _configSync;

		public LocalizeKey Name
		{
			get
			{
				LocalizeKey name = _name;
				if (name != null)
				{
					return name;
				}
				Piece component = Prefab.GetComponent<Piece>();
				if (component.m_name.StartsWith("$"))
				{
					_name = new LocalizeKey(component.m_name);
				}
				else
				{
					string text = "$piece_" + ((Object)Prefab).name.Replace(" ", "_");
					_name = new LocalizeKey(text).English(component.m_name);
					component.m_name = text;
				}
				return _name;
			}
		}

		public LocalizeKey Description
		{
			get
			{
				LocalizeKey description = _description;
				if (description != null)
				{
					return description;
				}
				Piece component = Prefab.GetComponent<Piece>();
				if (component.m_description.StartsWith("$"))
				{
					_description = new LocalizeKey(component.m_description);
				}
				else
				{
					string text = "$piece_" + ((Object)Prefab).name.Replace(" ", "_") + "_description";
					_description = new LocalizeKey(text).English(component.m_description);
					component.m_description = text;
				}
				return _description;
			}
		}

		private static Localization english => _english ?? (_english = LocalizationCache.ForLanguage("English"));

		internal static BaseUnityPlugin plugin
		{
			get
			{
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a9: Expected O, but got Unknown
				if (_plugin != null)
				{
					return _plugin;
				}
				IEnumerable<TypeInfo> source;
				try
				{
					source = Assembly.GetExecutingAssembly().DefinedTypes.ToList();
				}
				catch (ReflectionTypeLoadException ex)
				{
					source = from t in ex.Types
						where t != null
						select t.GetTypeInfo();
				}
				_plugin = (BaseUnityPlugin)Chainloader.ManagerObject.GetComponent((Type)source.First([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (TypeInfo t) => t.IsClass && typeof(BaseUnityPlugin).IsAssignableFrom(t)));
				return _plugin;
			}
		}

		[<337c9673-75d3-4cb3-958d-9da5326949c4>Nullable(2)]
		private static object configSync
		{
			[<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(2)]
			get
			{
				if (_configSync != null || !hasConfigSync)
				{
					return _configSync;
				}
				Type type = Assembly.GetExecutingAssembly().GetType("ServerSync.ConfigSync");
				if ((object)type != null)
				{
					_configSync = Activator.CreateInstance(type, plugin.Info.Metadata.GUID + " PieceManager");
					type.GetField("CurrentVersion").SetValue(_configSync, plugin.Info.Metadata.Version.ToString());
					type.GetProperty("IsLocked").SetValue(_configSync, true);
				}
				else
				{
					hasConfigSync = false;
				}
				return _configSync;
			}
		}

		public BuildPiece(string assetBundleFileName, string prefabName, string folderName = "assets")
			: this(PiecePrefabManager.RegisterAssetBundle(assetBundleFileName, folderName), prefabName)
		{
		}

		public BuildPiece(AssetBundle bundle, string prefabName)
		{
			Prefab = PiecePrefabManager.RegisterPrefab(bundle, prefabName);
			registeredPieces.Add(this);
		}

		internal static void Patch_FejdStartup(FejdStartup __instance)
		{
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Expected O, but got Unknown
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Expected O, but got Unknown
			//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: 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_0432: Expected O, but got Unknown
			//IL_0586: Unknown result type (might be due to invalid IL or missing references)
			//IL_0590: Expected O, but got Unknown
			//IL_0849: Unknown result type (might be due to invalid IL or missing references)
			//IL_0853: Expected O, but got Unknown
			//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0600: Expected O, but got Unknown
			//IL_0697: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a1: Expected O, but got Unknown
			//IL_08b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c3: Expected O, but got Unknown
			//IL_0ac1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0acb: Expected O, but got Unknown
			//IL_0b5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b64: Expected O, but got Unknown
			Type configManagerType = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (Assembly a) => a.GetName().Name == "ConfigurationManager")?.GetType("ConfigurationManager.ConfigurationManager");
			configManager = ((configManagerType == null) ? null : Chainloader.ManagerObject.GetComponent(configManagerType));
			foreach (BuildPiece registeredPiece in registeredPieces)
			{
				registeredPiece.activeTools = registeredPiece.Tool.Tools.DefaultIfEmpty("Hammer").ToArray();
				if (registeredPiece.Category.Category != BuildPieceCategory.Custom)
				{
					registeredPiece.Prefab.GetComponent<Piece>().m_category = (PieceCategory)registeredPiece.Category.Category;
				}
				else
				{
					registeredPiece.Prefab.GetComponent<Piece>().m_category = PiecePrefabManager.GetCategory(registeredPiece.Category.custom);
				}
			}
			if (!ConfigurationEnabled)
			{
				return;
			}
			bool saveOnConfigSet = plugin.Config.SaveOnConfigSet;
			plugin.Config.SaveOnConfigSet = false;
			foreach (BuildPiece registeredPiece2 in registeredPieces)
			{
				BuildPiece piece = registeredPiece2;
				if (piece.SpecialProperties.NoConfig)
				{
					continue;
				}
				PieceConfig pieceConfig2 = (pieceConfigs[piece] = new PieceConfig());
				PieceConfig cfg = pieceConfig2;
				Piece piecePrefab2 = piece.Prefab.GetComponent<Piece>();
				string pieceName = piecePrefab2.m_name;
				string englishName = new Regex("[=\\n\\t\\\\\"\\'\\[\\]]*").Replace(english.Localize(pieceName), "").Trim();
				string localizedName = Localization.instance.Localize(pieceName).Trim();
				int order = 0;
				cfg.category = config(englishName, "Build Table Category", piece.Category.Category, new ConfigDescription("Build Category where " + localizedName + " is available.", (AcceptableValueBase)null, new object[1]
				{
					new ConfigurationManagerAttributes
					{
						Order = (order -= 1),
						Category = localizedName
					}
				}));
				ConfigurationManagerAttributes customTableAttributes = new ConfigurationManagerAttributes
				{
					Order = (order -= 1),
					Browsable = (cfg.category.Value == BuildPieceCategory.Custom),
					Category = localizedName
				};
				cfg.customCategory = config(englishName, "Custom Build Category", piece.Category.custom, new ConfigDescription("", (AcceptableValueBase)null, new object[1] { customTableAttributes }));
				cfg.category.SettingChanged += BuildTableConfigChanged;
				cfg.customCategory.SettingChanged += BuildTableConfigChanged;
				if (cfg.category.Value == BuildPieceCategory.Custom)
				{
					piecePrefab2.m_category = PiecePrefabManager.GetCategory(cfg.customCategory.Value);
				}
				else
				{
					piecePrefab2.m_category = (PieceCategory)cfg.category.Value;
				}
				cfg.tools = config(englishName, "Tools", string.Join(", ", piece.activeTools), new ConfigDescription("Comma separated list of tools where " + localizedName + " is available.", (AcceptableValueBase)null, new object[1] { customTableAttributes }));
				piece.activeTools = (from s in cfg.tools.Value.Split(new char[1] { ',' })
					select s.Trim()).ToArray();
				cfg.tools.SettingChanged += [<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (object _, EventArgs _) =>
				{
					Inventory[] source = (from c in Player.s_players.Select([<df7b4729-1193-498d-8d8b-6128535eacb1>NullableContext(0)] (Player p) => ((Humanoid)p).GetInventory()).Concat(from c in Object.FindObjectsOfType<Container>()
							select c.GetInventory())
						where c != null
						select c).ToArray();
					Di