Decompiled source of Fatify v1.0.1
Fatify.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
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; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using EnigmaticThunder.Util; using MonoMod.RuntimeDetour.HookGen; using R2API.Utils; using RoR2; 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: R2API.Utils.ManualNetworkRegistration] [assembly: EnigmaticThunder.Util.ManualNetworkRegistration] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace EnigmaticThunder.Util { [AttributeUsage(AttributeTargets.Assembly)] public class ManualNetworkRegistrationAttribute : Attribute { } } namespace R2API.Utils { [AttributeUsage(AttributeTargets.Assembly)] public class ManualNetworkRegistrationAttribute : Attribute { } } namespace Fatify { [BepInPlugin("com.Ceepert.Fatify", "Fatify", "1.0.1")] public class FatifyPlugin : BaseUnityPlugin { private static AssetBundle assetBundle; private static readonly List<Material> materialsWithRoRShader = new List<Material>(); internal static FatifyPlugin Instance { get; private set; } internal static ManualLogSource InstanceLogger { get { FatifyPlugin instance = Instance; return (instance != null) ? ((BaseUnityPlugin)instance).Logger : null; } } private void Awake() { Instance = this; using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Fatify.ceepertfatify")) { 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)); ReplaceShaders(); } private static void ReplaceShaders() { materialsWithRoRShader.Add(LoadMaterialWithReplacedShader("Assets/Resource/Loader/Moonsoon/matSuctionCups.mat", "Hopoo Games/Deferred/Standard")); materialsWithRoRShader.Add(LoadMaterialWithReplacedShader("Assets/Mod/Skins/Rex/marTreebotFlower.mat", "Hopoo Games/Deferred/Standard")); materialsWithRoRShader.Add(LoadMaterialWithReplacedShader("Assets/Mod/Skins/Rex/marTreebotFlowerOni.mat", "Hopoo Games/Deferred/Standard")); materialsWithRoRShader.Add(LoadMaterialWithReplacedShader("Assets/Resource/Railgunner/Schooluniform/matNewRailgunner.mat", "Hopoo Games/Deferred/Standard")); materialsWithRoRShader.Add(LoadMaterialWithReplacedShader("Assets/Mod/Skins/Void Fiend/VoidFiend.mat", "Hopoo Games/Deferred/Standard")); materialsWithRoRShader.Add(LoadMaterialWithReplacedShader("Assets/Resource/Multi/MultiMaterial.mat", "Hopoo Games/Deferred/Standard")); materialsWithRoRShader.Add(LoadMaterialWithReplacedShader("Assets/Resource/Multi/Mastery/MultiMasteryMaterial.mat", "Hopoo Games/Deferred/Standard")); } private static Material LoadMaterialWithReplacedShader(string materialPath, string shaderName) { Material val = assetBundle.LoadAsset<Material>(materialPath); val.shader = Shader.Find(shaderName); return val; } private static void LanguageLoadStrings(Action<Language> orig, Language self) { orig(self); self.SetStringByToken("CEEPERT_SKIN_HUNTRESSBBWBODY_NAME", "Huntress BBW"); self.SetStringByToken("CEEPERT_SKIN_ARTIFICERBBW_NAME", "Artificer SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMCOMMANDOBBW_NAME", "Commando SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMMERCBBW_NAME", "Mercenary BBW"); self.SetStringByToken("CEEPERT_SKIN_FEMONIMERCBBW_NAME", "Mercenary Mastery BBW"); self.SetStringByToken("CEEPERT_SKIN_FEMONICOMMANDO_NAME", "Commandy Mastery SSBBW"); self.SetStringByToken("CEEPERT_SKIN_ONIHUNTRESSBBW_NAME", "Huntress Mastery BBW"); self.SetStringByToken("CEEPERT_SKIN_ARTIFICERBBWNOCAPE_NAME", "Artificer SSBBW (no cape)"); self.SetStringByToken("CEEPERT_SKIN_ARTIFICERONIBBW_NAME", "Artificer Mastery SSBBW"); self.SetStringByToken("CEEPERT_SKIN_ARTIFICERBBWONINONIPPLES_NAME", "Artificer Mastery SSBBW (no nipples)"); self.SetStringByToken("CEEPERT_SKIN_ENGIFEMBBWNOTURRETS_NAME", "Engi SSBBW (lame turrets)"); self.SetStringByToken("CEEPERT_SKIN_ENGIONIFEMNOTURRETS_NAME", "Engi Mastery SSBBW (lame turrets)"); self.SetStringByToken("CEEPERT_SKIN_FEMCAPTAINBBW_NAME", "Captain SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMCAPTAINSSBBW_NAME", "Captain SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMONICAPTIANSSBBW_NAME", "Captain Mastery SSBBW"); self.SetStringByToken("CEEPERT_SKIN_LOADERSSBBW_NAME", "Loader SSBBW"); self.SetStringByToken("CEEPERT_SKIN_LOADERONISSBBW_NAME", "Loader Mastery SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMBANDITSSBBW_NAME", "Bandit SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMONIBANDITSSBBW_NAME", "Bandit Mastery SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMACRIDSSBBW_NAME", "Acrid SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMACRIDONISSBBW_NAME", "Albino SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMREXSSBBW_NAME", "Rex SSBBW"); self.SetStringByToken("CEEPERT_SKIN_FEMREXONISSBBW_NAME", "Rex Moonsoon SSBBW"); self.SetStringByToken("CEEPERT_SKIN_RAILGUNNER_BBW_SU_NAME", "Railgunner Schooluniform"); self.SetStringByToken("CEEPERT_SKIN_RAILGUNNERSSBBW_NAME", "Railgunner SSBBW"); self.SetStringByToken("CEEPERT_SKIN_RAILGUNNERSSBBWMOONSOON_NAME", "Sniper SSBBW"); self.SetStringByToken("CEEPERT_SKIN_VFSSBBW_NAME", "Void Fiend SSBBW"); self.SetStringByToken("CEEPERT_SKIN_VFSSBBWMASTERYALTMAT_NAME", "Void Fiend SSBBW Mastery Alt Material"); self.SetStringByToken("CEEPERT_SKIN_WFSSBBWMASTERY_NAME", "Void Fiend SSBBW Mastery"); self.SetStringByToken("CEEPERT_SKIN_MULTISSBBW_NAME", "Multi SSBBW"); self.SetStringByToken("CEEPERT_SKIN_MULTIMASTERYSSBBW_NAME", "Multi SSBBW+"); self.SetStringByToken("CEEPERT_SKIN_ENGIFEMBBW_NAME", "Engi SSBBW"); self.SetStringByToken("CEEPERT_SKIN_ENGIONIFEMBBW_NAME", "Engi Mastery SSBBW"); } private static void Nothing(Action<SkinDef> orig, SkinDef self) { } private static void BodyCatalogInit() { MethodInfo method = typeof(SkinDef).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic); HookEndpointManager.Add((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing)); AddHuntressBodyHuntressBBWBodySkin(); AddMageBodyArtificerBBWSkin(); AddCommandoBodyFemCommandoBBWSkin(); AddMercBodyFemMercBBWSkin(); AddMercBodyFemOniMercBBWSkin(); AddCommandoBodyFemOniCommandoSkin(); AddHuntressBodyOniHuntressBBWSkin(); AddMageBodyArtificerBBWNoCapeSkin(); AddMageBodyArtificerOniBBWSkin(); AddMageBodyArtificerBBWOniNoNipplesSkin(); AddEngiTurretBodyEngiTurretsSkin(); AddEngiWalkerTurretBodyEngitTurretsMobileSkin(); AddEngiBodyEngiFemBBWNoTurretsSkin(); AddEngiBodyEngiOniFemNoTurretsSkin(); AddCaptainBodyFemCaptainBBWSkin(); AddCaptainBodyFemCaptainSSBBWSkin(); AddCaptainBodyFemOniCaptianSSBBWSkin(); AddLoaderBodyLoaderSSBBWSkin(); AddLoaderBodyLoaderOniSSBBWSkin(); AddBandit2BodyFemBanditSSBBWSkin(); AddBandit2BodyFemOniBanditSSBBWSkin(); AddCrocoBodyFemAcridSSBBWSkin(); AddCrocoBodyFemAcridOniSSBBWSkin(); AddTreebotBodyFemRexSSBBWSkin(); AddTreebotBodyFemRexOniSSBBWSkin(); AddRailgunnerBodyRailgunner_BBW_SUSkin(); AddRailgunnerBodyRailgunnerSSBBWSkin(); AddRailgunnerBodyRailgunnerSSBBWMoonsoonSkin(); AddVoidSurvivorBodyVFSSBBWSkin(); AddVoidSurvivorBodyVFSSBBWMasteryAltMatSkin(); AddVoidSurvivorBodyWFSSBBWMasterySkin(); AddToolbotBodyMultiSSBBWSkin(); AddToolbotBodyMultiMasterySSBBWSkin(); AddEngiBodyEngiFemBBWSkin(); AddEngiBodyEngiOniFemBBWSkin(); HookEndpointManager.Remove((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing)); } private static void AddHuntressBodyHuntressBBWBodySkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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) string text = "HuntressBody"; string text2 = "HuntressBBWBody"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\HuntressBBWBodyIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_HUNTRESSBBWBODY_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[2] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\HuntressMesh.mesh"), renderer = componentsInChildren[10] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\HuntressScarfMesh.mesh"), renderer = componentsInChildren[11] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddMageBodyArtificerBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) string text = "MageBody"; string text2 = "ArtificerBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\ArtificerBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ARTIFICERBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[6] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\MageMesh.mesh"), renderer = componentsInChildren[7] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\MageCapeMesh.mesh"), renderer = componentsInChildren[6] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Right.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Left.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[3] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[4] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddCommandoBodyFemCommandoBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "CommandoBody"; string text2 = "FemCommandoBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemCommandoBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMCOMMANDOBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemCommandoHuntressMesh.mesh"), renderer = componentsInChildren[6] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddMercBodyFemMercBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "MercBody"; string text2 = "FemMercBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemMercBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMMERCBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemMercMesh.mesh"), renderer = componentsInChildren[7] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddMercBodyFemOniMercBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "MercBody"; string text2 = "FemOniMercBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemOniMercBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMONIMERCBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemMercMeshOni.mesh"), renderer = componentsInChildren[7] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddCommandoBodyFemOniCommandoSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "CommandoBody"; string text2 = "FemOniCommando"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemOniCommandoIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMONICOMMANDO_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\HuntressMeshHornet.mesh"), renderer = componentsInChildren[6] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddHuntressBodyOniHuntressBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_013b: Unknown result type (might be due to invalid IL or missing references) string text = "HuntressBody"; string text2 = "OniHuntressBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\OniHuntressBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ONIHUNTRESSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\HuntressOniMesh.mesh"), renderer = componentsInChildren[10] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddMageBodyArtificerBBWNoCapeSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) string text = "MageBody"; string text2 = "ArtificerBBWNoCape"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\ArtificerBBWNoCapeIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ARTIFICERBBWNOCAPE_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[6] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\MageMeshNoCape.mesh"), renderer = componentsInChildren[7] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[6] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Right.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Left.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[3] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[4] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddMageBodyArtificerOniBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) string text = "MageBody"; string text2 = "ArtificerOniBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\ArtificerOniBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ARTIFICERONIBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[6] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\MageAltMesh.mesh"), renderer = componentsInChildren[6] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[7] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Right.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Left.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[3] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[4] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddMageBodyArtificerBBWOniNoNipplesSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) string text = "MageBody"; string text2 = "ArtificerBBWOniNoNipples"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\ArtificerBBWOniNoNipplesIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ARTIFICERBBWONINONIPPLES_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[6] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\MageAltMeshNoNipples.mesh"), renderer = componentsInChildren[7] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[6] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Right.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Jets, Left.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[3] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[4] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddEngiTurretBodyEngiTurretsSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "EngiTurretBody"; string text2 = "EngiTurrets"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\EngiTurretsIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ENGITURRETS_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Turret.mesh"), renderer = componentsInChildren[0] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddEngiWalkerTurretBodyEngitTurretsMobileSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "EngiWalkerTurretBody"; string text2 = "EngitTurretsMobile"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\EngitTurretsMobileIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ENGITTURRETSMOBILE_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\EngiTurretMesh.mesh"), renderer = componentsInChildren[0] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddEngiBodyEngiFemBBWNoTurretsSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "EngiBody"; string text2 = "EngiFemBBWNoTurrets"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\EngiFemBBWNoTurretsIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ENGIFEMBBWNOTURRETS_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\EngiMeshModified.mesh"), renderer = componentsInChildren[4] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddEngiBodyEngiOniFemNoTurretsSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = "EngiBody"; string text2 = "EngiOniFemNoTurrets"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\EngiOniFemNoTurretsIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_ENGIONIFEMNOTURRETS_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\EngiMilitaryMeshModified.mesh"), renderer = componentsInChildren[4] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddCaptainBodyFemCaptainBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01da: 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_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) string text = "CaptainBody"; string text2 = "FemCaptainBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemCaptainBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMCAPTAINBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[7] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\Captain.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainChestArmor.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainCoat.mesh"), renderer = componentsInChildren[3] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainGunArm.mesh"), renderer = componentsInChildren[4] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainHead.mesh"), renderer = componentsInChildren[5] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainUndercoat.mesh"), renderer = componentsInChildren[6] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddCaptainBodyFemCaptainSSBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01da: 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_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) string text = "CaptainBody"; string text2 = "FemCaptainSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemCaptainSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMCAPTAINSSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[7] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainXL.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainChestArmorXL.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainCoatXL.mesh"), renderer = componentsInChildren[3] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainGunArmXL.mesh"), renderer = componentsInChildren[4] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainHeadXL.mesh"), renderer = componentsInChildren[5] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainUndercoatXL.mesh"), renderer = componentsInChildren[6] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddCaptainBodyFemOniCaptianSSBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) string text = "CaptainBody"; string text2 = "FemOniCaptianSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemOniCaptianSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMONICAPTIANSSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[7] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainOni.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainChestArmorOni.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainCoatOni.mesh"), renderer = componentsInChildren[3] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainGunArmOni.mesh"), renderer = componentsInChildren[4] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CaptainHeadOni.mesh"), renderer = componentsInChildren[5] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[6] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddLoaderBodyLoaderSSBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) string text = "LoaderBody"; string text2 = "LoaderSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\LoaderSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_LOADERSSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[3] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\LoaderMechMesh.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\PilotFemaleMesh.mesh"), renderer = componentsInChildren[2] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddLoaderBodyLoaderOniSSBBWSkin() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) string text = "LoaderBody"; string text2 = "LoaderOniSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\LoaderOniSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_LOADERONISSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = (RendererInfo[])(object)new RendererInfo[1] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resource/Loader/Moonsoon/matSuctionCups.mat"), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, renderer = componentsInChildren[1] } }; val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[3] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\LoaderMechMeshOni.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\PilotFemaleFoldedOverJumpsuitOni.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\PilotFemaleMeshOni.mesh"), renderer = componentsInChildren[2] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddBandit2BodyFemBanditSSBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) string text = "Bandit2Body"; string text2 = "FemBanditSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemBanditSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMBANDITSSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[5] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditAccessories.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditArms.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditMesh.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditCoatMesh.mesh"), renderer = componentsInChildren[3] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditHat.mesh"), renderer = componentsInChildren[6] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddBandit2BodyFemOniBanditSSBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) string text = "Bandit2Body"; string text2 = "FemOniBanditSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemOniBanditSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMONIBANDITSSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[5] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditAccessoriesOni.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditArmsOni.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditMeshOni.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\FemBanditCoatMeshOni.mesh"), renderer = componentsInChildren[3] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[6] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddCrocoBodyFemAcridSSBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) string text = "CrocoBody"; string text2 = "FemAcridSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemAcridSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMACRIDSSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[2] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CrocoMesh.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CrocoSpineMesh.mesh"), renderer = componentsInChildren[3] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddCrocoBodyFemAcridOniSSBBWSkin() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) string text = "CrocoBody"; string text2 = "FemAcridOniSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemAcridOniSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMACRIDONISSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = Array.Empty<RendererInfo>(); val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[2] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CrocoMeshOni.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\CrocoSpineMeshOni.mesh"), renderer = componentsInChildren[3] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddTreebotBodyFemRexSSBBWSkin() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_01bc: 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_0213: Unknown result type (might be due to invalid IL or missing references) string text = "TreebotBody"; string text2 = "FemRexSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemRexSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMREXSSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = (RendererInfo[])(object)new RendererInfo[1] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Mod/Skins/Rex/marTreebotFlower.mat"), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, renderer = componentsInChildren[1] } }; val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[4] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\TreebotBotMesh.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\TreebotFlowerMesh.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\TreebotLeafletMesh.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\TreebotRootMesh.mesh"), renderer = componentsInChildren[3] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddTreebotBodyFemRexOniSSBBWSkin() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) string text = "TreebotBody"; string text2 = "FemRexOniSSBBW"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\FemRexOniSSBBWIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_FEMREXONISSBBW_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[1] }; val2.unlockableDef = null; val2.gameObjectActivations = Array.Empty<GameObjectActivation>(); val2.rendererInfos = (RendererInfo[])(object)new RendererInfo[1] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Mod/Skins/Rex/marTreebotFlowerOni.mat"), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, renderer = componentsInChildren[1] } }; val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[3] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\TreebotBotMeshOni.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\TreebotFlowerMeshOni.mesh"), renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\TreebotRootMeshOni.mesh"), renderer = componentsInChildren[3] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddRailgunnerBodyRailgunner_BBW_SUSkin() { //IL_00a5: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0192: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0344: 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_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) string text = "RailgunnerBody"; string text2 = "Railgunner_BBW_SU"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); ModelLocator component = val.GetComponent<ModelLocator>(); GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController component2 = gameObject.GetComponent<ModelSkinController>(); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef val2 = ScriptableObject.CreateInstance<SkinDef>(); val2.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Fatify\\Icons\\Railgunner_BBW_SUIcon.png"); ((Object)val2).name = text2; val2.nameToken = "CEEPERT_SKIN_RAILGUNNER_BBW_SU_NAME"; val2.rootObject = gameObject; val2.baseSkins = (SkinDef[])(object)new SkinDef[1] { component2.skins[0] }; val2.unlockableDef = null; val2.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[22] { new GameObjectActivation { gameObject = ((Component)componentsInChildren[0]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[1]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[2]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[3]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[4]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[5]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[6]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[7]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[8]).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[9]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[10]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[11]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[12]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[13]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[14]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[15]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[16]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[17]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[18]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[19]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[20]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)componentsInChildren[21]).gameObject, shouldActivate = false } }; val2.rendererInfos = (RendererInfo[])(object)new RendererInfo[1] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resource/Railgunner/Schooluniform/matNewRailgunner.mat"), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, renderer = componentsInChildren[2] } }; val2.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[5] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\mdlRailgunBackpackMesh.mesh"), renderer = componentsInChildren[0] }, new MeshReplacement { mesh = null, renderer = componentsInChildren[1] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\mdlRailGunnerBase.mesh"), renderer = componentsInChildren[2] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\mdlRailGunnerMetal.mesh"), renderer = componentsInChildren[3] }, new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\Fatify\\Meshes\\mdlRailgunProto.mesh"), renderer = componentsInChildren[4] } }; val2.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val2.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); Array.Resize(ref component2.skins, component2.skins.Length + 1); component2.skins[component2.skins.Length - 1] = val2; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = component2.skins; } catch (Exception ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex); } } private static void AddRailgunnerBodyRai