Decompiled source of Whisper Railgunner v1.0.1

WhisperRailgunner.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using MonoMod.RuntimeDetour;
using MonoMod.RuntimeDetour.HookGen;
using RoR2;
using RoR2.ContentManagement;
using RuneFoxMods.DynamicSkins;
using UnityEngine;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace WhisperRailgunner
{
	[BepInPlugin("com.ProfessionalDipshit.WhisperRailgunner", "Whisper Railgunner", "1.0.0")]
	public class WhisperRailgunnerPlugin : BaseUnityPlugin
	{
		public class DynamicSkinExtension
		{
			private Modification MaskedHairRootModification;

			private Modification MaskedBreastRootl1Modification;

			private Modification MaskedBreastRootrModification;

			private Modification MaskedTailRootModification;

			private Modification ClosedEyesHairRootModification;

			private Modification ClosedEyesBreastRootl1Modification;

			private Modification ClosedEyesBreastRootrModification;

			private Modification ClosedEyesTailRootModification;

			private Modification OpenEyesHairRootModification;

			private Modification OpenEyesBreastRootl1Modification;

			private Modification OpenEyesBreastRootrModification;

			private Modification OpenEyesTailRootModification;

			private Modification NSFWMaskedHairRootModification;

			private Modification NSFWMaskedBreastRootl1Modification;

			private Modification NSFWMaskedBreastRootrModification;

			private Modification NSFWMaskedTailRootModification;

			private Modification NSFWClosedEyesHairRootModification;

			private Modification NSFWClosedEyesBreastRootl1Modification;

			private Modification NSFWClosedEyesBreastRootrModification;

			private Modification NSFWClosedEyesTailRootModification;

			private Modification NSFWOpenEyesHairRootModification;

			private Modification NSFWOpenEyesBreastRootl1Modification;

			private Modification NSFWOpenEyesBreastRootrModification;

			private Modification NSFWOpenEyesTailRootModification;

			private Modification ThiccMaskedHairRootModification;

			private Modification ThiccMaskedBreastRootl1Modification;

			private Modification ThiccMaskedBreastRootrModification;

			private Modification ThiccMaskedTailRootModification;

			private Modification ThiccClosedEyesHairRootModification;

			private Modification ThiccClosedEyesBreastRootl1Modification;

			private Modification ThiccClosedEyesBreastRootrModification;

			private Modification ThiccClosedEyesTailRootModification;

			private Modification ThiccOpenEyesHairRootModification;

			private Modification ThiccOpenEyesBreastRootl1Modification;

			private Modification ThiccOpenEyesBreastRootrModification;

			private Modification ThiccOpenEyesTailRootModification;

			internal void BeforeStart()
			{
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				_DynamicSkinManager.InstanceLogger = ((BaseUnityPlugin)Instance).Logger;
				new Hook((MethodBase)typeof(SkinDef).GetMethod("Apply"), (Delegate)new Action<Action<SkinDef, GameObject>, SkinDef, GameObject>(_DynamicSkinManager.SkinDefApply)).Apply();
			}

			internal void AfterStart()
			{
				InitializeModifications();
				InitializeDynamicBones();
				AddModificationsToList();
			}

			internal void BeforeBodyCatalogInit()
			{
				RailgunnerBodyMaskedSkinAddedEvent += onSkinAdded;
				RailgunnerBodyClosedEyesSkinAddedEvent += onSkinAdded;
				RailgunnerBodyOpenEyesSkinAddedEvent += onSkinAdded;
				RailgunnerBodyNSFWMaskedSkinAddedEvent += onSkinAdded;
				RailgunnerBodyNSFWClosedEyesSkinAddedEvent += onSkinAdded;
				RailgunnerBodyNSFWOpenEyesSkinAddedEvent += onSkinAdded;
				RailgunnerBodyThiccMaskedSkinAddedEvent += onSkinAdded;
				RailgunnerBodyThiccClosedEyesSkinAddedEvent += onSkinAdded;
				RailgunnerBodyThiccOpenEyesSkinAddedEvent += onSkinAdded;
			}

			internal void AfterBodyCatalogInit()
			{
			}

			private void InitializeModifications()
			{
				MaskedHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 32, AffectsBaseModel: true, assetBundle);
				MaskedBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 67, AffectsBaseModel: true, assetBundle);
				MaskedBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 64, AffectsBaseModel: true, assetBundle);
				MaskedTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 93, AffectsBaseModel: true, assetBundle);
				ClosedEyesHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 32, AffectsBaseModel: true, assetBundle);
				ClosedEyesBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 67, AffectsBaseModel: true, assetBundle);
				ClosedEyesBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 64, AffectsBaseModel: true, assetBundle);
				ClosedEyesTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 93, AffectsBaseModel: true, assetBundle);
				OpenEyesHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 32, AffectsBaseModel: true, assetBundle);
				OpenEyesBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 67, AffectsBaseModel: true, assetBundle);
				OpenEyesBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 64, AffectsBaseModel: true, assetBundle);
				OpenEyesTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 93, AffectsBaseModel: true, assetBundle);
				NSFWMaskedHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 32, AffectsBaseModel: true, assetBundle);
				NSFWMaskedBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 67, AffectsBaseModel: true, assetBundle);
				NSFWMaskedBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 64, AffectsBaseModel: true, assetBundle);
				NSFWMaskedTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 93, AffectsBaseModel: true, assetBundle);
				NSFWClosedEyesHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 32, AffectsBaseModel: true, assetBundle);
				NSFWClosedEyesBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 67, AffectsBaseModel: true, assetBundle);
				NSFWClosedEyesBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 64, AffectsBaseModel: true, assetBundle);
				NSFWClosedEyesTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 93, AffectsBaseModel: true, assetBundle);
				NSFWOpenEyesHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 32, AffectsBaseModel: true, assetBundle);
				NSFWOpenEyesBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 67, AffectsBaseModel: true, assetBundle);
				NSFWOpenEyesBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 64, AffectsBaseModel: true, assetBundle);
				NSFWOpenEyesTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 93, AffectsBaseModel: true, assetBundle);
				ThiccMaskedHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 32, AffectsBaseModel: true, assetBundle);
				ThiccMaskedBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 67, AffectsBaseModel: true, assetBundle);
				ThiccMaskedBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 64, AffectsBaseModel: true, assetBundle);
				ThiccMaskedTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 93, AffectsBaseModel: true, assetBundle);
				ThiccClosedEyesHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 32, AffectsBaseModel: true, assetBundle);
				ThiccClosedEyesBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 67, AffectsBaseModel: true, assetBundle);
				ThiccClosedEyesBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 64, AffectsBaseModel: true, assetBundle);
				ThiccClosedEyesTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 93, AffectsBaseModel: true, assetBundle);
				ThiccOpenEyesHairRootModification = new Modification("HairRoot.prefab", "head", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 32, AffectsBaseModel: true, assetBundle);
				ThiccOpenEyesBreastRootl1Modification = new Modification("BreastRootl1.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 67, AffectsBaseModel: true, assetBundle);
				ThiccOpenEyesBreastRootrModification = new Modification("BreastRootr.prefab", "chest", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 64, AffectsBaseModel: true, assetBundle);
				ThiccOpenEyesTailRootModification = new Modification("TailRoot.prefab", "stomach", "RailgunnerBody", "PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 93, AffectsBaseModel: true, assetBundle);
			}

			private void InitializeDynamicBones()
			{
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0105: Unknown result type (might be due to invalid IL or missing references)
				//IL_016d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0181: Unknown result type (might be due to invalid IL or missing references)
				//IL_0195: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_021d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0231: Unknown result type (might be due to invalid IL or missing references)
				//IL_0245: Unknown result type (might be due to invalid IL or missing references)
				//IL_029c: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_031b: Unknown result type (might be due to invalid IL or missing references)
				//IL_032f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0343: Unknown result type (might be due to invalid IL or missing references)
				//IL_0363: Unknown result type (might be due to invalid IL or missing references)
				//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_03df: Unknown result type (might be due to invalid IL or missing references)
				//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_0413: Unknown result type (might be due to invalid IL or missing references)
				//IL_047b: Unknown result type (might be due to invalid IL or missing references)
				//IL_048f: Unknown result type (might be due to invalid IL or missing references)
				//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
				//IL_050e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0522: Unknown result type (might be due to invalid IL or missing references)
				//IL_0579: Unknown result type (might be due to invalid IL or missing references)
				//IL_058d: Unknown result type (might be due to invalid IL or missing references)
				//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
				//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0629: Unknown result type (might be due to invalid IL or missing references)
				//IL_063d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0651: Unknown result type (might be due to invalid IL or missing references)
				//IL_0671: Unknown result type (might be due to invalid IL or missing references)
				//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
				//IL_06ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_0701: Unknown result type (might be due to invalid IL or missing references)
				//IL_0758: Unknown result type (might be due to invalid IL or missing references)
				//IL_076c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0780: Unknown result type (might be due to invalid IL or missing references)
				//IL_07d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_07eb: Unknown result type (might be due to invalid IL or missing references)
				//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
				//IL_081f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0887: Unknown result type (might be due to invalid IL or missing references)
				//IL_089b: Unknown result type (might be due to invalid IL or missing references)
				//IL_08af: Unknown result type (might be due to invalid IL or missing references)
				//IL_08cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_0937: Unknown result type (might be due to invalid IL or missing references)
				//IL_094b: Unknown result type (might be due to invalid IL or missing references)
				//IL_095f: Unknown result type (might be due to invalid IL or missing references)
				//IL_09b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_09ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_09de: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a35: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a49: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a5d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a7d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ae5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0af9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b0d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b2d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b95: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ba9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bbd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c14: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c28: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c3c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c93: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ca7: Unknown result type (might be due to invalid IL or missing references)
				//IL_0cbb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0cdb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d43: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d57: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d6b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d8b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0df3: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e07: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e1b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e72: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e86: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e9a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ef1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f05: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f19: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f39: Unknown result type (might be due to invalid IL or missing references)
				//IL_0fa1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0fb5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0fc9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0fe9: Unknown result type (might be due to invalid IL or missing references)
				//IL_1051: Unknown result type (might be due to invalid IL or missing references)
				//IL_1065: Unknown result type (might be due to invalid IL or missing references)
				//IL_1079: Unknown result type (might be due to invalid IL or missing references)
				//IL_10d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_10e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_10f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_114f: Unknown result type (might be due to invalid IL or missing references)
				//IL_1163: Unknown result type (might be due to invalid IL or missing references)
				//IL_1177: Unknown result type (might be due to invalid IL or missing references)
				//IL_1197: Unknown result type (might be due to invalid IL or missing references)
				//IL_11ff: Unknown result type (might be due to invalid IL or missing references)
				//IL_1213: Unknown result type (might be due to invalid IL or missing references)
				//IL_1227: Unknown result type (might be due to invalid IL or missing references)
				//IL_1247: Unknown result type (might be due to invalid IL or missing references)
				//IL_12af: Unknown result type (might be due to invalid IL or missing references)
				//IL_12c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_12d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_132e: Unknown result type (might be due to invalid IL or missing references)
				//IL_1342: Unknown result type (might be due to invalid IL or missing references)
				//IL_1356: Unknown result type (might be due to invalid IL or missing references)
				//IL_13ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_13c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_13d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_13f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_145d: Unknown result type (might be due to invalid IL or missing references)
				//IL_1471: Unknown result type (might be due to invalid IL or missing references)
				//IL_1485: Unknown result type (might be due to invalid IL or missing references)
				//IL_14a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_150d: Unknown result type (might be due to invalid IL or missing references)
				//IL_1521: Unknown result type (might be due to invalid IL or missing references)
				//IL_1535: Unknown result type (might be due to invalid IL or missing references)
				MaskedHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				MaskedBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				MaskedBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				MaskedTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ClosedEyesHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ClosedEyesBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ClosedEyesBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ClosedEyesTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				OpenEyesHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				OpenEyesBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				OpenEyesBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				OpenEyesTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				NSFWMaskedHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				NSFWMaskedBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				NSFWMaskedBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				NSFWMaskedTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				NSFWClosedEyesHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				NSFWClosedEyesBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				NSFWClosedEyesBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				NSFWClosedEyesTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				NSFWOpenEyesHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				NSFWOpenEyesBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				NSFWOpenEyesBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				NSFWOpenEyesTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ThiccMaskedHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ThiccMaskedBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ThiccMaskedBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ThiccMaskedTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ThiccClosedEyesHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ThiccClosedEyesBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ThiccClosedEyesBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ThiccClosedEyesTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ThiccOpenEyesHairRootModification.dynamicBoneData = new DynamicBoneData("HairRoot", 0.1f, null, 0.07f, null, 0.2f, null, 0.02f, null, 0f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
				ThiccOpenEyesBreastRootl1Modification.dynamicBoneData = new DynamicBoneData("BreastRootl1", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ThiccOpenEyesBreastRootrModification.dynamicBoneData = new DynamicBoneData("BreastRootr", 0.05f, null, 0.02f, null, 0f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>
				{
					new DynamicBoneColliderData("thigh.r", (Direction)1, new Vector3(-0.07f, 0.3f, 0.04f), (Bound)0, 0.3f, 1.2f)
				}, new List<string>(), (FreezeAxis)0);
				ThiccOpenEyesTailRootModification.dynamicBoneData = new DynamicBoneData("TailRoot", 0.1f, null, 0.07f, null, 0.1f, null, 0f, null, 0.02f, null, 0f, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new List<DynamicBoneColliderData>(), new List<string>(), (FreezeAxis)0);
			}

			private void AddModificationsToList()
			{
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 32, MaskedHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 67, MaskedBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 64, MaskedBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", 93, MaskedTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 32, ClosedEyesHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 67, ClosedEyesBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 64, ClosedEyesBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", 93, ClosedEyesTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 32, OpenEyesHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 67, OpenEyesBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 64, OpenEyesBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", 93, OpenEyesTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 32, NSFWMaskedHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 67, NSFWMaskedBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 64, NSFWMaskedBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", 93, NSFWMaskedTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 32, NSFWClosedEyesHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 67, NSFWClosedEyesBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 64, NSFWClosedEyesBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", 93, NSFWClosedEyesTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 32, NSFWOpenEyesHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 67, NSFWOpenEyesBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 64, NSFWOpenEyesBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", 93, NSFWOpenEyesTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 32, ThiccMaskedHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 67, ThiccMaskedBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 64, ThiccMaskedBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", 93, ThiccMaskedTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 32, ThiccClosedEyesHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 67, ThiccClosedEyesBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 64, ThiccClosedEyesBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", 93, ThiccClosedEyesTailRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 32, ThiccOpenEyesHairRootModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 67, ThiccOpenEyesBreastRootl1Modification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 64, ThiccOpenEyesBreastRootrModification);
				_DynamicSkinManager.AddModification("PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", 93, ThiccOpenEyesTailRootModification);
			}

			private static void onSkinAdded(object sender, SkinAddedArgs e)
			{
				_DynamicSkinManager.AddSkinDef(e.skinDef);
			}
		}

		public delegate void VoidDelegate();

		public class SkinAddedArgs : EventArgs
		{
			public SkinDef skinDef { get; }

			public GameObject bodyPrefab { get; }

			public SkinAddedArgs(SkinDef newSkinDef, GameObject newGameObject)
			{
				skinDef = newSkinDef;
				bodyPrefab = newGameObject;
			}
		}

		private class FieldException : Exception
		{
			public FieldException(string message, Exception innerException)
				: base(message, innerException)
			{
			}
		}

		private static DynamicSkinExtension _DynamicSkinExtension = new DynamicSkinExtension();

		private static DynamicSkinManager _DynamicSkinManager = new DynamicSkinManager();

		private static VoidDelegate BeforeStartDelegate;

		private static VoidDelegate AfterStartDelegate;

		private static VoidDelegate BeforeBodyCatalogDelegate;

		private static VoidDelegate AfterBodyCatalogDelegate;

		private static AssetBundle assetBundle;

		internal static WhisperRailgunnerPlugin Instance { get; private set; }

		internal static ManualLogSource InstanceLogger
		{
			get
			{
				WhisperRailgunnerPlugin instance = Instance;
				return (instance != null) ? ((BaseUnityPlugin)instance).Logger : null;
			}
		}

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyClosedEyesSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyNSFWClosedEyesSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyThiccClosedEyesSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyMaskedSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyNSFWMaskedSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyThiccMaskedSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyOpenEyesSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyNSFWOpenEyesSkinAddedEvent;

		private static event EventHandler<SkinAddedArgs> RailgunnerBodyThiccOpenEyesSkinAddedEvent;

		private void Start()
		{
			Instance = this;
			BeforeStart();
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("WhisperRailgunner.professionaldipshitwhisperrailgunner"))
			{
				assetBundle = AssetBundle.LoadFromStream(stream);
			}
			((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)BodyCatalogInit);
			HookEndpointManager.Add((MethodBase)typeof(Language).GetMethod("LoadStrings"), (Delegate)new Action<Action<Language>, Language>(LanguageLoadStrings));
			AfterStart();
		}

		private void BeforeStart()
		{
			BeforeStartDelegate = (VoidDelegate)Delegate.Combine(BeforeStartDelegate, new VoidDelegate(_DynamicSkinExtension.BeforeStart));
			BeforeStartDelegate?.Invoke();
		}

		private void AfterStart()
		{
			AfterStartDelegate = (VoidDelegate)Delegate.Combine(AfterStartDelegate, new VoidDelegate(_DynamicSkinExtension.AfterStart));
			AfterStartDelegate?.Invoke();
		}

		private static void BeforeBodyCatalogInit()
		{
			BeforeBodyCatalogDelegate = (VoidDelegate)Delegate.Combine(BeforeBodyCatalogDelegate, new VoidDelegate(_DynamicSkinExtension.BeforeBodyCatalogInit));
			BeforeBodyCatalogDelegate?.Invoke();
		}

		private static void AfterBodyCatalogInit()
		{
			AfterBodyCatalogDelegate = (VoidDelegate)Delegate.Combine(AfterBodyCatalogDelegate, new VoidDelegate(_DynamicSkinExtension.AfterBodyCatalogInit));
			AfterBodyCatalogDelegate?.Invoke();
		}

		private static void LanguageLoadStrings(Action<Language> orig, Language self)
		{
			orig(self);
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME", "Whisper (no mask)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME", "Nude Whisper (no mask)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME", "Thicc Whisper (no mask)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME", "Whisper (mask)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME", "Nude Whisper (mask)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_THICCMASKED_NAME", "Thicc Whisper (mask)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_OPENEYES_NAME", "Whisper (eyes open)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_NSFWOPENEYES_NAME", "Nude Whisper (eyes open)");
			self.SetStringByToken("PROFESSIONAL_DIPSHIT_SKIN_THICCOPENEYES_NAME", "Thicc Whisper (eyes open)");
		}

		private static void Nothing(Action<SkinDef> orig, SkinDef self)
		{
		}

		private static void BodyCatalogInit()
		{
			BeforeBodyCatalogInit();
			MethodInfo method = typeof(SkinDef).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic);
			HookEndpointManager.Add((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing));
			AddRailgunnerBodyClosedEyesSkin();
			AddRailgunnerBodyNSFWClosedEyesSkin();
			AddRailgunnerBodyThiccClosedEyesSkin();
			AddRailgunnerBodyMaskedSkin();
			AddRailgunnerBodyNSFWMaskedSkin();
			AddRailgunnerBodyThiccMaskedSkin();
			AddRailgunnerBodyOpenEyesSkin();
			AddRailgunnerBodyNSFWOpenEyesSkin();
			AddRailgunnerBodyThiccOpenEyesSkin();
			HookEndpointManager.Remove((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing));
			AfterBodyCatalogInit();
		}

		private static void RailgunnerBodyClosedEyesSkinAdded(SkinDef skinDef, GameObject bodyPrefab)
		{
			WhisperRailgunnerPlugin.RailgunnerBodyClosedEyesSkinAddedEvent(Instance, new SkinAddedArgs(skinDef, bodyPrefab));
		}

		private static void AddRailgunnerBodyClosedEyesSkin()
		{
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			if (!((BaseUnityPlugin)Instance).Config.Bind<bool>("ClosedEyes", "Enabled", true, (ConfigDescription)null).Value)
			{
				return;
			}
			string text = "RailgunnerBody";
			string text2 = "ClosedEyes";
			try
			{
				GameObject val = BodyCatalog.FindBodyPrefab(text);
				if (!Object.op_Implicit((Object)(object)val))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist"));
					return;
				}
				ModelLocator component = val.GetComponent<ModelLocator>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component"));
					return;
				}
				GameObject gameObject = ((Component)component.modelTransform).gameObject;
				ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null);
				if (!Object.op_Implicit((Object)(object)val2))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component"));
					return;
				}
				Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true);
				SkinDef skin = ScriptableObject.CreateInstance<SkinDef>();
				TryCatchThrow("Icon", delegate
				{
					skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\WhisperRailgunner\\Icons\\ClosedEyesIcon.png");
				});
				((Object)skin).name = text2;
				skin.nameToken = "PROFESSIONAL_DIPSHIT_SKIN_CLOSEDEYES_NAME";
				skin.rootObject = gameObject;
				TryCatchThrow("Base Skins", delegate
				{
					skin.baseSkins = Array.Empty<SkinDef>();
				});
				TryCatchThrow("Unlockable Name", delegate
				{
					skin.unlockableDef = ((IEnumerable<UnlockableDef>)ContentManager.unlockableDefs).FirstOrDefault((Func<UnlockableDef, bool>)((UnlockableDef def) => def.cachedName == "Whisper (no mask)"));
				});
				TryCatchThrow("Game Object Activations", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_0034: Unknown result type (might be due to invalid IL or missing references)
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0061: Unknown result type (might be due to invalid IL or missing references)
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_008c: Unknown result type (might be due to invalid IL or missing references)
					//IL_008d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0096: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0140: Unknown result type (might be due to invalid IL or missing references)
					//IL_0141: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_016d: Unknown result type (might be due to invalid IL or missing references)
					//IL_016e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0177: Unknown result type (might be due to invalid IL or missing references)
					//IL_019a: Unknown result type (might be due to invalid IL or missing references)
					//IL_019b: Unknown result type (might be due to invalid IL or missing references)
					//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0201: Unknown result type (might be due to invalid IL or missing references)
					//IL_0224: Unknown result type (might be due to invalid IL or missing references)
					//IL_0225: Unknown result type (might be due to invalid IL or missing references)
					skin.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[12]
					{
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[5]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[6]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[7]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[9]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[10]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[13]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[14]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[15]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[17]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[18]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[19]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[20]).gameObject,
							shouldActivate = false
						}
					};
				});
				TryCatchThrow("Renderer Infos", delegate
				{
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0030: Unknown result type (might be due to invalid IL or missing references)
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					//IL_004d: Unknown result type (might be due to invalid IL or missing references)
					skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[1]
					{
						new RendererInfo
						{
							defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Whisper/Ressources/Whisper.fbx"),
							defaultShadowCastingMode = (ShadowCastingMode)1,
							ignoreOverlays = false,
							renderer = renderers[2]
						}
					};
				});
				TryCatchThrow("Mesh Replacements", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_003d: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0047: Unknown result type (might be due to invalid IL or missing references)
					//IL_0072: Unknown result type (might be due to invalid IL or missing references)
					//IL_0073: Unknown result type (might be due to invalid IL or missing references)
					//IL_007c: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
					//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
					//IL_00de: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0149: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0153: Unknown result type (might be due to invalid IL or missing references)
					//IL_017f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0180: Unknown result type (might be due to invalid IL or missing references)
					//IL_0189: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01be: Unknown result type (might be due to invalid IL or missing references)
					//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
					skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[9]
					{
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\body sfw close.mesh"),
							renderer = renderers[2]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[0]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[1]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[11]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[12]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[16]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[21]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[8]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[3]
						}
					};
				});
				TryCatchThrow("Minion Skin Replacements", delegate
				{
					skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>();
				});
				TryCatchThrow("Projectile Ghost Replacements", delegate
				{
					skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>();
				});
				Array.Resize(ref val2.skins, val2.skins.Length + 1);
				val2.skins[val2.skins.Length - 1] = skin;
				BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = val2.skins;
				RailgunnerBodyClosedEyesSkinAdded(skin, val);
			}
			catch (FieldException ex)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message));
				InstanceLogger.LogError((object)ex.InnerException);
			}
			catch (Exception ex2)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogError((object)ex2);
			}
		}

		private static void RailgunnerBodyNSFWClosedEyesSkinAdded(SkinDef skinDef, GameObject bodyPrefab)
		{
			WhisperRailgunnerPlugin.RailgunnerBodyNSFWClosedEyesSkinAddedEvent(Instance, new SkinAddedArgs(skinDef, bodyPrefab));
		}

		private static void AddRailgunnerBodyNSFWClosedEyesSkin()
		{
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			if (!((BaseUnityPlugin)Instance).Config.Bind<bool>("NSFWClosedEyes", "Enabled", true, (ConfigDescription)null).Value)
			{
				return;
			}
			string text = "RailgunnerBody";
			string text2 = "NSFWClosedEyes";
			try
			{
				GameObject val = BodyCatalog.FindBodyPrefab(text);
				if (!Object.op_Implicit((Object)(object)val))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist"));
					return;
				}
				ModelLocator component = val.GetComponent<ModelLocator>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component"));
					return;
				}
				GameObject gameObject = ((Component)component.modelTransform).gameObject;
				ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null);
				if (!Object.op_Implicit((Object)(object)val2))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component"));
					return;
				}
				Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true);
				SkinDef skin = ScriptableObject.CreateInstance<SkinDef>();
				TryCatchThrow("Icon", delegate
				{
					skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\WhisperRailgunner\\Icons\\NSFWClosedEyesIcon.png");
				});
				((Object)skin).name = text2;
				skin.nameToken = "PROFESSIONAL_DIPSHIT_SKIN_NSFWCLOSEDEYES_NAME";
				skin.rootObject = gameObject;
				TryCatchThrow("Base Skins", delegate
				{
					skin.baseSkins = Array.Empty<SkinDef>();
				});
				TryCatchThrow("Unlockable Name", delegate
				{
					skin.unlockableDef = ((IEnumerable<UnlockableDef>)ContentManager.unlockableDefs).FirstOrDefault((Func<UnlockableDef, bool>)((UnlockableDef def) => def.cachedName == "Nude Whisper (no mask)"));
				});
				TryCatchThrow("Game Object Activations", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_0034: Unknown result type (might be due to invalid IL or missing references)
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0061: Unknown result type (might be due to invalid IL or missing references)
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_008c: Unknown result type (might be due to invalid IL or missing references)
					//IL_008d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0096: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0140: Unknown result type (might be due to invalid IL or missing references)
					//IL_0141: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_016d: Unknown result type (might be due to invalid IL or missing references)
					//IL_016e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0177: Unknown result type (might be due to invalid IL or missing references)
					//IL_019a: Unknown result type (might be due to invalid IL or missing references)
					//IL_019b: Unknown result type (might be due to invalid IL or missing references)
					//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0201: Unknown result type (might be due to invalid IL or missing references)
					//IL_0224: Unknown result type (might be due to invalid IL or missing references)
					//IL_0225: Unknown result type (might be due to invalid IL or missing references)
					skin.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[12]
					{
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[5]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[6]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[7]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[9]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[10]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[13]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[14]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[15]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[17]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[18]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[19]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[20]).gameObject,
							shouldActivate = false
						}
					};
				});
				TryCatchThrow("Renderer Infos", delegate
				{
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0030: Unknown result type (might be due to invalid IL or missing references)
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					//IL_004d: Unknown result type (might be due to invalid IL or missing references)
					skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[1]
					{
						new RendererInfo
						{
							defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Whisper/Ressources/Whisper.fbx"),
							defaultShadowCastingMode = (ShadowCastingMode)1,
							ignoreOverlays = false,
							renderer = renderers[2]
						}
					};
				});
				TryCatchThrow("Mesh Replacements", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_003d: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0047: Unknown result type (might be due to invalid IL or missing references)
					//IL_0072: Unknown result type (might be due to invalid IL or missing references)
					//IL_0073: Unknown result type (might be due to invalid IL or missing references)
					//IL_007c: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
					//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
					//IL_00de: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0149: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0153: Unknown result type (might be due to invalid IL or missing references)
					//IL_017f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0180: Unknown result type (might be due to invalid IL or missing references)
					//IL_0189: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01be: Unknown result type (might be due to invalid IL or missing references)
					//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
					skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[9]
					{
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\Nsfw normal close.mesh"),
							renderer = renderers[2]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[0]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[1]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[11]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[12]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[16]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[21]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[8]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[3]
						}
					};
				});
				TryCatchThrow("Minion Skin Replacements", delegate
				{
					skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>();
				});
				TryCatchThrow("Projectile Ghost Replacements", delegate
				{
					skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>();
				});
				Array.Resize(ref val2.skins, val2.skins.Length + 1);
				val2.skins[val2.skins.Length - 1] = skin;
				BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = val2.skins;
				RailgunnerBodyNSFWClosedEyesSkinAdded(skin, val);
			}
			catch (FieldException ex)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message));
				InstanceLogger.LogError((object)ex.InnerException);
			}
			catch (Exception ex2)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogError((object)ex2);
			}
		}

		private static void RailgunnerBodyThiccClosedEyesSkinAdded(SkinDef skinDef, GameObject bodyPrefab)
		{
			WhisperRailgunnerPlugin.RailgunnerBodyThiccClosedEyesSkinAddedEvent(Instance, new SkinAddedArgs(skinDef, bodyPrefab));
		}

		private static void AddRailgunnerBodyThiccClosedEyesSkin()
		{
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			if (!((BaseUnityPlugin)Instance).Config.Bind<bool>("ThiccClosedEyes", "Enabled", true, (ConfigDescription)null).Value)
			{
				return;
			}
			string text = "RailgunnerBody";
			string text2 = "ThiccClosedEyes";
			try
			{
				GameObject val = BodyCatalog.FindBodyPrefab(text);
				if (!Object.op_Implicit((Object)(object)val))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist"));
					return;
				}
				ModelLocator component = val.GetComponent<ModelLocator>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component"));
					return;
				}
				GameObject gameObject = ((Component)component.modelTransform).gameObject;
				ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null);
				if (!Object.op_Implicit((Object)(object)val2))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component"));
					return;
				}
				Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true);
				SkinDef skin = ScriptableObject.CreateInstance<SkinDef>();
				TryCatchThrow("Icon", delegate
				{
					skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\WhisperRailgunner\\Icons\\ThiccClosedEyesIcon.png");
				});
				((Object)skin).name = text2;
				skin.nameToken = "PROFESSIONAL_DIPSHIT_SKIN_THICCCLOSEDEYES_NAME";
				skin.rootObject = gameObject;
				TryCatchThrow("Base Skins", delegate
				{
					skin.baseSkins = Array.Empty<SkinDef>();
				});
				TryCatchThrow("Unlockable Name", delegate
				{
					skin.unlockableDef = ((IEnumerable<UnlockableDef>)ContentManager.unlockableDefs).FirstOrDefault((Func<UnlockableDef, bool>)((UnlockableDef def) => def.cachedName == "Thicc Whisper (no mask)"));
				});
				TryCatchThrow("Game Object Activations", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_0034: Unknown result type (might be due to invalid IL or missing references)
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0061: Unknown result type (might be due to invalid IL or missing references)
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_008c: Unknown result type (might be due to invalid IL or missing references)
					//IL_008d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0096: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0140: Unknown result type (might be due to invalid IL or missing references)
					//IL_0141: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_016d: Unknown result type (might be due to invalid IL or missing references)
					//IL_016e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0177: Unknown result type (might be due to invalid IL or missing references)
					//IL_019a: Unknown result type (might be due to invalid IL or missing references)
					//IL_019b: Unknown result type (might be due to invalid IL or missing references)
					//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0201: Unknown result type (might be due to invalid IL or missing references)
					//IL_0224: Unknown result type (might be due to invalid IL or missing references)
					//IL_0225: Unknown result type (might be due to invalid IL or missing references)
					skin.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[12]
					{
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[5]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[6]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[7]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[9]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[10]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[13]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[14]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[15]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[17]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[18]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[19]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[20]).gameObject,
							shouldActivate = false
						}
					};
				});
				TryCatchThrow("Renderer Infos", delegate
				{
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0030: Unknown result type (might be due to invalid IL or missing references)
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					//IL_004d: Unknown result type (might be due to invalid IL or missing references)
					skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[1]
					{
						new RendererInfo
						{
							defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Whisper/Ressources/Whisper.fbx"),
							defaultShadowCastingMode = (ShadowCastingMode)1,
							ignoreOverlays = false,
							renderer = renderers[2]
						}
					};
				});
				TryCatchThrow("Mesh Replacements", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_003d: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0047: Unknown result type (might be due to invalid IL or missing references)
					//IL_0072: Unknown result type (might be due to invalid IL or missing references)
					//IL_0073: Unknown result type (might be due to invalid IL or missing references)
					//IL_007c: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
					//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
					//IL_00de: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0149: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0153: Unknown result type (might be due to invalid IL or missing references)
					//IL_017f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0180: Unknown result type (might be due to invalid IL or missing references)
					//IL_0189: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01be: Unknown result type (might be due to invalid IL or missing references)
					//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
					skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[9]
					{
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\Giga thicc close.mesh"),
							renderer = renderers[2]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[0]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[1]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[11]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[12]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[16]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[21]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[8]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[3]
						}
					};
				});
				TryCatchThrow("Minion Skin Replacements", delegate
				{
					skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>();
				});
				TryCatchThrow("Projectile Ghost Replacements", delegate
				{
					skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>();
				});
				Array.Resize(ref val2.skins, val2.skins.Length + 1);
				val2.skins[val2.skins.Length - 1] = skin;
				BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = val2.skins;
				RailgunnerBodyThiccClosedEyesSkinAdded(skin, val);
			}
			catch (FieldException ex)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message));
				InstanceLogger.LogError((object)ex.InnerException);
			}
			catch (Exception ex2)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogError((object)ex2);
			}
		}

		private static void RailgunnerBodyMaskedSkinAdded(SkinDef skinDef, GameObject bodyPrefab)
		{
			WhisperRailgunnerPlugin.RailgunnerBodyMaskedSkinAddedEvent(Instance, new SkinAddedArgs(skinDef, bodyPrefab));
		}

		private static void AddRailgunnerBodyMaskedSkin()
		{
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			if (!((BaseUnityPlugin)Instance).Config.Bind<bool>("Masked", "Enabled", true, (ConfigDescription)null).Value)
			{
				return;
			}
			string text = "RailgunnerBody";
			string text2 = "Masked";
			try
			{
				GameObject val = BodyCatalog.FindBodyPrefab(text);
				if (!Object.op_Implicit((Object)(object)val))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist"));
					return;
				}
				ModelLocator component = val.GetComponent<ModelLocator>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component"));
					return;
				}
				GameObject gameObject = ((Component)component.modelTransform).gameObject;
				ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null);
				if (!Object.op_Implicit((Object)(object)val2))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component"));
					return;
				}
				Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true);
				SkinDef skin = ScriptableObject.CreateInstance<SkinDef>();
				TryCatchThrow("Icon", delegate
				{
					skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\WhisperRailgunner\\Icons\\MaskedIcon.png");
				});
				((Object)skin).name = text2;
				skin.nameToken = "PROFESSIONAL_DIPSHIT_SKIN_MASKED_NAME";
				skin.rootObject = gameObject;
				TryCatchThrow("Base Skins", delegate
				{
					skin.baseSkins = Array.Empty<SkinDef>();
				});
				TryCatchThrow("Unlockable Name", delegate
				{
					skin.unlockableDef = ((IEnumerable<UnlockableDef>)ContentManager.unlockableDefs).FirstOrDefault((Func<UnlockableDef, bool>)((UnlockableDef def) => def.cachedName == "Whisper (mask)"));
				});
				TryCatchThrow("Game Object Activations", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_0034: Unknown result type (might be due to invalid IL or missing references)
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0061: Unknown result type (might be due to invalid IL or missing references)
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_008c: Unknown result type (might be due to invalid IL or missing references)
					//IL_008d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0096: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0140: Unknown result type (might be due to invalid IL or missing references)
					//IL_0141: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_016d: Unknown result type (might be due to invalid IL or missing references)
					//IL_016e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0177: Unknown result type (might be due to invalid IL or missing references)
					//IL_019a: Unknown result type (might be due to invalid IL or missing references)
					//IL_019b: Unknown result type (might be due to invalid IL or missing references)
					//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
					//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
					//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0201: Unknown result type (might be due to invalid IL or missing references)
					//IL_0224: Unknown result type (might be due to invalid IL or missing references)
					//IL_0225: Unknown result type (might be due to invalid IL or missing references)
					skin.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[12]
					{
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[5]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[6]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[7]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[9]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[10]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[13]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[14]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[15]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[17]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[18]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[19]).gameObject,
							shouldActivate = false
						},
						new GameObjectActivation
						{
							gameObject = ((Component)renderers[20]).gameObject,
							shouldActivate = false
						}
					};
				});
				TryCatchThrow("Renderer Infos", delegate
				{
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0030: Unknown result type (might be due to invalid IL or missing references)
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					//IL_004d: Unknown result type (might be due to invalid IL or missing references)
					skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[1]
					{
						new RendererInfo
						{
							defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Whisper/Ressources/Whisper.fbx"),
							defaultShadowCastingMode = (ShadowCastingMode)1,
							ignoreOverlays = false,
							renderer = renderers[2]
						}
					};
				});
				TryCatchThrow("Mesh Replacements", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_003d: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0047: Unknown result type (might be due to invalid IL or missing references)
					//IL_0072: Unknown result type (might be due to invalid IL or missing references)
					//IL_0073: Unknown result type (might be due to invalid IL or missing references)
					//IL_007c: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
					//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
					//IL_00de: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0149: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0153: Unknown result type (might be due to invalid IL or missing references)
					//IL_017f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0180: Unknown result type (might be due to invalid IL or missing references)
					//IL_0189: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
					//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
					//IL_01be: Unknown result type (might be due to invalid IL or missing references)
					//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
					//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
					skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[9]
					{
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\body sfw mask.mesh"),
							renderer = renderers[2]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[0]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[1]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[11]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[12]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[16]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[21]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[8]
						},
						new MeshReplacement
						{
							mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\WhisperRailgunner\\Meshes\\empty.mesh"),
							renderer = renderers[3]
						}
					};
				});
				TryCatchThrow("Minion Skin Replacements", delegate
				{
					skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>();
				});
				TryCatchThrow("Projectile Ghost Replacements", delegate
				{
					skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>();
				});
				Array.Resize(ref val2.skins, val2.skins.Length + 1);
				val2.skins[val2.skins.Length - 1] = skin;
				BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = val2.skins;
				RailgunnerBodyMaskedSkinAdded(skin, val);
			}
			catch (FieldException ex)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message));
				InstanceLogger.LogError((object)ex.InnerException);
			}
			catch (Exception ex2)
			{
				InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\""));
				InstanceLogger.LogError((object)ex2);
			}
		}

		private static void RailgunnerBodyNSFWMaskedSkinAdded(SkinDef skinDef, GameObject bodyPrefab)
		{
			WhisperRailgunnerPlugin.RailgunnerBodyNSFWMaskedSkinAddedEvent(Instance, new SkinAddedArgs(skinDef, bodyPrefab));
		}

		private static void AddRailgunnerBodyNSFWMaskedSkin()
		{
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			if (!((BaseUnityPlugin)Instance).Config.Bind<bool>("NSFWMasked", "Enabled", true, (ConfigDescription)null).Value)
			{
				return;
			}
			string text = "RailgunnerBody";
			string text2 = "NSFWMasked";
			try
			{
				GameObject val = BodyCatalog.FindBodyPrefab(text);
				if (!Object.op_Implicit((Object)(object)val))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist"));
					return;
				}
				ModelLocator component = val.GetComponent<ModelLocator>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component"));
					return;
				}
				GameObject gameObject = ((Component)component.modelTransform).gameObject;
				ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null);
				if (!Object.op_Implicit((Object)(object)val2))
				{
					InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component"));
					return;
				}
				Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true);
				SkinDef skin = ScriptableObject.CreateInstance<SkinDef>();
				TryCatchThrow("Icon", delegate
				{
					skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\WhisperRailgunner\\Icons\\NSFWMaskedIcon.png");
				});
				((Object)skin).name = text2;
				skin.nameToken = "PROFESSIONAL_DIPSHIT_SKIN_NSFWMASKED_NAME";
				skin.rootObject = gameObject;
				TryCatchThrow("Base Skins", delegate
				{
					skin.baseSkins = Array.Empty<SkinDef>();
				});
				TryCatchThrow("Unlockable Name", delegate
				{
					skin.unlockableDef = ((IEnumerable<UnlockableDef>)ContentManager.unlockableDefs).FirstOrDefault((Func<UnlockableDef, bool>)((UnlockableDef def) => def.cachedName == "Nude Whisper (mask)"));
				});
				TryCatchThrow("Game Object Activations", delegate
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_0034: Unknown result type (might be due to invalid IL or missing references)
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0061: Unknown result type (might be due to invalid IL or missing references)
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_008c: Unknown result type (might be due to invalid IL or missing references)
					//IL_008d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0096: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
					//IL_0113: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_011d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0140: Unknown result type (might be due to invalid IL or missing references)
					//IL_0141: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be