using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BodyModelAdditionsAPI;
using Microsoft.CodeAnalysis;
using RoR2;
using RoR2.ContentManagement;
using RoR2BepInExPack.GameAssetPaths;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.ResourceManagement.AsyncOperations;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Hatify")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+ef15566c29a1758c91f77024464b96d4e110293d")]
[assembly: AssemblyProduct("Hatify")]
[assembly: AssemblyTitle("Hatify")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace Hatify
{
[BepInPlugin("com.Nuxlar.Hatify", "Hatify", "1.2.0")]
public class Hatify : BaseUnityPlugin
{
[CompilerGenerated]
private static class <>O
{
public static CodeAfterApplying <0>__PlaceItBandit;
public static CodeAfterApplying <1>__PlaceItCaptain;
public static CodeAfterApplying <2>__PlaceItCommando;
public static CodeAfterApplying <3>__PlaceItRailgunner;
public static CodeAfterApplying <4>__PlaceItMage;
public static CodeAfterApplying <5>__PlaceItHuntress;
public static CodeAfterApplying <6>__PlaceItCroco;
public static CodeAfterApplying <7>__PlaceItEngi;
public static CodeAfterApplying <8>__PlaceItEngiWalker;
public static CodeAfterApplying <9>__PlaceItEngiTurret;
public static CodeAfterApplying <10>__PlaceItMerc;
public static CodeAfterApplying <11>__PlaceItVoid;
public static CodeAfterApplying <12>__PlaceItLoader;
}
private static Material hatMat;
private static Material banditHatMat;
private static List<string> bodyNames = new List<string>
{
"Bandit2Body", "CaptainBody", "CommandoBody", "RailgunnerBody", "MageBody", "HuntressBody", "CrocoBody", "MercBody", "VoidSurvivorBody", "EngiBody",
"EngiTurretBody", "EngiWalkerTurretBody", "LoaderBody"
};
public static ConfigEntry<float> commandoSize;
public static ConfigEntry<float> banditSize;
public static ConfigEntry<float> huntressSize;
public static ConfigEntry<float> engiSize;
public static ConfigEntry<float> engiTurretSize;
public static ConfigEntry<float> engiWalkerTurretSize;
public static ConfigEntry<float> artiSize;
public static ConfigEntry<float> mercSize;
public static ConfigEntry<float> loaderSize;
public static ConfigEntry<float> acridSize;
public static ConfigEntry<float> captainSize;
public static ConfigEntry<float> railgunnerSize;
public static ConfigEntry<float> fiendSize;
private static ConfigFile HatifyConfig { get; set; }
public void Awake()
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Expected O, but got Unknown
HatifyConfig = new ConfigFile(Paths.ConfigPath + "\\com.Nuxlar.Hatify.cfg", true);
commandoSize = HatifyConfig.Bind<float>("General", "Commando Hat Size", 1.3f, "The scale of the hat.");
banditSize = HatifyConfig.Bind<float>("General", "Bandit Hat Size", 1f, "The scale of the hat.");
huntressSize = HatifyConfig.Bind<float>("General", "Huntress Hat Size", 1.3f, "The scale of the hat.");
engiSize = HatifyConfig.Bind<float>("General", "Engi Hat Size", 1.6f, "The scale of the hat.");
engiTurretSize = HatifyConfig.Bind<float>("General", "Engi Turret Hat Size", 10f, "The scale of the hat.");
engiWalkerTurretSize = HatifyConfig.Bind<float>("General", "Engi Walker Turret Hat Size", 8f, "The scale of the hat.");
artiSize = HatifyConfig.Bind<float>("General", "Artificer Hat Size", 1f, "The scale of the hat.");
mercSize = HatifyConfig.Bind<float>("General", "Merc Hat Size", 1.4f, "The scale of the hat.");
loaderSize = HatifyConfig.Bind<float>("General", "Loader Hat Size", 1.5f, "The scale of the hat.");
acridSize = HatifyConfig.Bind<float>("General", "Acrid Hat Size", 15f, "The scale of the hat.");
captainSize = HatifyConfig.Bind<float>("General", "Captain Hat Size", 1.3f, "The scale of the hat.");
railgunnerSize = HatifyConfig.Bind<float>("General", "Railgunner Hat Size", 1f, "The scale of the hat.");
fiendSize = HatifyConfig.Bind<float>("General", "Fiend Hat Size", 1.4f, "The scale of the hat.");
LoadAssets();
}
private static void LoadAssets()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
AsyncOperationHandle<Material> val = AssetAsyncReferenceManager<Material>.LoadAsset(new AssetReferenceT<Material>(RoR2_Base_Commando.matCommandoDualies_mat), (AsyncReferenceHandleUnloadType)2);
val.Completed += delegate(AsyncOperationHandle<Material> x)
{
hatMat = x.Result;
};
val = AssetAsyncReferenceManager<Material>.LoadAsset(new AssetReferenceT<Material>(RoR2_Base_Bandit2.matBandit2AltColossus_mat), (AsyncReferenceHandleUnloadType)2);
val.Completed += delegate(AsyncOperationHandle<Material> x)
{
banditHatMat = x.Result;
};
AsyncOperationHandle<GameObject> val2 = AssetAsyncReferenceManager<GameObject>.LoadAsset(new AssetReferenceT<GameObject>(RoR2_Base_Bandit2.mdlBandit2_fbx), (AsyncReferenceHandleUnloadType)2);
val2.Completed += delegate(AsyncOperationHandle<GameObject> x)
{
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_054c: Unknown result type (might be due to invalid IL or missing references)
//IL_0551: Unknown result type (might be due to invalid IL or missing references)
//IL_0831: Unknown result type (might be due to invalid IL or missing references)
//IL_0836: Unknown result type (might be due to invalid IL or missing references)
//IL_07b8: Unknown result type (might be due to invalid IL or missing references)
//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
//IL_0644: Unknown result type (might be due to invalid IL or missing references)
//IL_0649: Unknown result type (might be due to invalid IL or missing references)
//IL_0454: Unknown result type (might be due to invalid IL or missing references)
//IL_0459: Unknown result type (might be due to invalid IL or missing references)
//IL_0560: Unknown result type (might be due to invalid IL or missing references)
//IL_0565: Unknown result type (might be due to invalid IL or missing references)
//IL_056c: Unknown result type (might be due to invalid IL or missing references)
//IL_0573: Unknown result type (might be due to invalid IL or missing references)
//IL_057e: Unknown result type (might be due to invalid IL or missing references)
//IL_0842: Unknown result type (might be due to invalid IL or missing references)
//IL_0847: Unknown result type (might be due to invalid IL or missing references)
//IL_084e: Unknown result type (might be due to invalid IL or missing references)
//IL_0855: Unknown result type (might be due to invalid IL or missing references)
//IL_0860: Unknown result type (might be due to invalid IL or missing references)
//IL_0264: Unknown result type (might be due to invalid IL or missing references)
//IL_0269: Unknown result type (might be due to invalid IL or missing references)
//IL_035c: Unknown result type (might be due to invalid IL or missing references)
//IL_0361: Unknown result type (might be due to invalid IL or missing references)
//IL_06c0: Unknown result type (might be due to invalid IL or missing references)
//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
//IL_07cc: Unknown result type (might be due to invalid IL or missing references)
//IL_07d1: Unknown result type (might be due to invalid IL or missing references)
//IL_07d8: Unknown result type (might be due to invalid IL or missing references)
//IL_07df: Unknown result type (might be due to invalid IL or missing references)
//IL_07ea: Unknown result type (might be due to invalid IL or missing references)
//IL_0658: Unknown result type (might be due to invalid IL or missing references)
//IL_065d: Unknown result type (might be due to invalid IL or missing references)
//IL_0664: Unknown result type (might be due to invalid IL or missing references)
//IL_066b: Unknown result type (might be due to invalid IL or missing references)
//IL_0676: Unknown result type (might be due to invalid IL or missing references)
//IL_0468: Unknown result type (might be due to invalid IL or missing references)
//IL_046d: Unknown result type (might be due to invalid IL or missing references)
//IL_0474: Unknown result type (might be due to invalid IL or missing references)
//IL_047b: Unknown result type (might be due to invalid IL or missing references)
//IL_0486: Unknown result type (might be due to invalid IL or missing references)
//IL_073c: Unknown result type (might be due to invalid IL or missing references)
//IL_0741: Unknown result type (might be due to invalid IL or missing references)
//IL_05a4: Expected O, but got Unknown
//IL_059f: Unknown result type (might be due to invalid IL or missing references)
//IL_058f: Unknown result type (might be due to invalid IL or missing references)
//IL_0594: Unknown result type (might be due to invalid IL or missing references)
//IL_059a: Expected O, but got Unknown
//IL_0886: Expected O, but got Unknown
//IL_0881: Unknown result type (might be due to invalid IL or missing references)
//IL_0871: Unknown result type (might be due to invalid IL or missing references)
//IL_0876: Unknown result type (might be due to invalid IL or missing references)
//IL_087c: Expected O, but got Unknown
//IL_0278: Unknown result type (might be due to invalid IL or missing references)
//IL_027d: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Unknown result type (might be due to invalid IL or missing references)
//IL_028b: Unknown result type (might be due to invalid IL or missing references)
//IL_0296: Unknown result type (might be due to invalid IL or missing references)
//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0370: Unknown result type (might be due to invalid IL or missing references)
//IL_0375: Unknown result type (might be due to invalid IL or missing references)
//IL_037c: Unknown result type (might be due to invalid IL or missing references)
//IL_0383: 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_04d0: Unknown result type (might be due to invalid IL or missing references)
//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
//IL_06d4: Unknown result type (might be due to invalid IL or missing references)
//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
//IL_06e0: Unknown result type (might be due to invalid IL or missing references)
//IL_06e7: Unknown result type (might be due to invalid IL or missing references)
//IL_06f2: Unknown result type (might be due to invalid IL or missing references)
//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
//IL_0810: Expected O, but got Unknown
//IL_080b: Unknown result type (might be due to invalid IL or missing references)
//IL_07fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0800: Unknown result type (might be due to invalid IL or missing references)
//IL_0806: Expected O, but got Unknown
//IL_069c: Expected O, but got Unknown
//IL_0697: Unknown result type (might be due to invalid IL or missing references)
//IL_0687: Unknown result type (might be due to invalid IL or missing references)
//IL_068c: Unknown result type (might be due to invalid IL or missing references)
//IL_0692: Expected O, but got Unknown
//IL_04ac: Expected O, but got Unknown
//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
//IL_0497: Unknown result type (might be due to invalid IL or missing references)
//IL_049c: Unknown result type (might be due to invalid IL or missing references)
//IL_04a2: Expected O, but got Unknown
//IL_0750: Unknown result type (might be due to invalid IL or missing references)
//IL_0755: Unknown result type (might be due to invalid IL or missing references)
//IL_075c: Unknown result type (might be due to invalid IL or missing references)
//IL_0763: Unknown result type (might be due to invalid IL or missing references)
//IL_076e: Unknown result type (might be due to invalid IL or missing references)
//IL_05c8: Unknown result type (might be due to invalid IL or missing references)
//IL_05cd: Unknown result type (might be due to invalid IL or missing references)
//IL_02bc: Expected O, but got Unknown
//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
//IL_02b2: Expected O, but got Unknown
//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0300: Unknown result type (might be due to invalid IL or missing references)
//IL_0307: Unknown result type (might be due to invalid IL or missing references)
//IL_0312: Unknown result type (might be due to invalid IL or missing references)
//IL_03b4: Expected O, but got Unknown
//IL_03af: Unknown result type (might be due to invalid IL or missing references)
//IL_039f: Unknown result type (might be due to invalid IL or missing references)
//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
//IL_03aa: Expected O, but got Unknown
//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
//IL_04e9: Unknown result type (might be due to invalid IL or missing references)
//IL_04f0: 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_0502: Unknown result type (might be due to invalid IL or missing references)
//IL_0718: Expected O, but got Unknown
//IL_0713: Unknown result type (might be due to invalid IL or missing references)
//IL_0703: Unknown result type (might be due to invalid IL or missing references)
//IL_0708: Unknown result type (might be due to invalid IL or missing references)
//IL_070e: Expected O, but got Unknown
//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
//IL_03ff: Unknown result type (might be due to invalid IL or missing references)
//IL_040a: Unknown result type (might be due to invalid IL or missing references)
//IL_0794: Expected O, but got Unknown
//IL_078f: Unknown result type (might be due to invalid IL or missing references)
//IL_077f: Unknown result type (might be due to invalid IL or missing references)
//IL_0784: Unknown result type (might be due to invalid IL or missing references)
//IL_078a: Expected O, but got Unknown
//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
//IL_05fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0338: Expected O, but got Unknown
//IL_0333: Unknown result type (might be due to invalid IL or missing references)
//IL_0323: Unknown result type (might be due to invalid IL or missing references)
//IL_0328: Unknown result type (might be due to invalid IL or missing references)
//IL_032e: Expected O, but got Unknown
//IL_0528: Expected O, but got Unknown
//IL_0523: Unknown result type (might be due to invalid IL or missing references)
//IL_0513: Unknown result type (might be due to invalid IL or missing references)
//IL_0518: Unknown result type (might be due to invalid IL or missing references)
//IL_051e: Expected O, but got Unknown
//IL_0430: Expected O, but got Unknown
//IL_042b: 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_0420: Unknown result type (might be due to invalid IL or missing references)
//IL_0426: Expected O, but got Unknown
//IL_0620: Expected O, but got Unknown
//IL_061b: Unknown result type (might be due to invalid IL or missing references)
//IL_060b: Unknown result type (might be due to invalid IL or missing references)
//IL_0610: Unknown result type (might be due to invalid IL or missing references)
//IL_0616: Expected O, but got Unknown
GameObject gameObject = ((Component)x.Result.transform.GetChild(4).GetChild(2).GetChild(0)
.GetChild(6)
.GetChild(0)
.GetChild(2)
.GetChild(0)).gameObject;
gameObject.AddComponent<NetworkIdentity>();
foreach (string bodyName in bodyNames)
{
_ = Vector3.zero;
switch (bodyName)
{
case "Bandit2Body":
if (new Vector3(banditSize.Value, banditSize.Value, banditSize.Value) != Vector3.zero)
{
ModelPartInfo val17 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj8 = <>O.<0>__PlaceItBandit;
if (obj8 == null)
{
CodeAfterApplying val18 = PlaceItBandit;
<>O.<0>__PlaceItBandit = val18;
obj8 = (object)val18;
}
val17.codeAfterApplying = (CodeAfterApplying)obj8;
new ModelPart(val17);
}
break;
case "CaptainBody":
if (new Vector3(captainSize.Value, captainSize.Value, captainSize.Value) != Vector3.zero)
{
ModelPartInfo val7 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj3 = <>O.<1>__PlaceItCaptain;
if (obj3 == null)
{
CodeAfterApplying val8 = PlaceItCaptain;
<>O.<1>__PlaceItCaptain = val8;
obj3 = (object)val8;
}
val7.codeAfterApplying = (CodeAfterApplying)obj3;
new ModelPart(val7);
}
break;
case "CommandoBody":
if (new Vector3(commandoSize.Value, commandoSize.Value, commandoSize.Value) != Vector3.zero)
{
ModelPartInfo val21 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj10 = <>O.<2>__PlaceItCommando;
if (obj10 == null)
{
CodeAfterApplying val22 = PlaceItCommando;
<>O.<2>__PlaceItCommando = val22;
obj10 = (object)val22;
}
val21.codeAfterApplying = (CodeAfterApplying)obj10;
new ModelPart(val21);
}
break;
case "RailgunnerBody":
if (new Vector3(railgunnerSize.Value, railgunnerSize.Value, railgunnerSize.Value) != Vector3.zero)
{
ModelPartInfo val5 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj2 = <>O.<3>__PlaceItRailgunner;
if (obj2 == null)
{
CodeAfterApplying val6 = PlaceItRailgunner;
<>O.<3>__PlaceItRailgunner = val6;
obj2 = (object)val6;
}
val5.codeAfterApplying = (CodeAfterApplying)obj2;
new ModelPart(val5);
}
break;
case "MageBody":
if (new Vector3(artiSize.Value, artiSize.Value, artiSize.Value) != Vector3.zero)
{
ModelPartInfo val15 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj7 = <>O.<4>__PlaceItMage;
if (obj7 == null)
{
CodeAfterApplying val16 = PlaceItMage;
<>O.<4>__PlaceItMage = val16;
obj7 = (object)val16;
}
val15.codeAfterApplying = (CodeAfterApplying)obj7;
new ModelPart(val15);
}
break;
case "HuntressBody":
if (new Vector3(huntressSize.Value, huntressSize.Value, huntressSize.Value) != Vector3.zero)
{
ModelPartInfo val23 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj11 = <>O.<5>__PlaceItHuntress;
if (obj11 == null)
{
CodeAfterApplying val24 = PlaceItHuntress;
<>O.<5>__PlaceItHuntress = val24;
obj11 = (object)val24;
}
val23.codeAfterApplying = (CodeAfterApplying)obj11;
new ModelPart(val23);
}
break;
case "CrocoBody":
if (new Vector3(acridSize.Value, acridSize.Value, acridSize.Value) != Vector3.zero)
{
ModelPartInfo val9 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj4 = <>O.<6>__PlaceItCroco;
if (obj4 == null)
{
CodeAfterApplying val10 = PlaceItCroco;
<>O.<6>__PlaceItCroco = val10;
obj4 = (object)val10;
}
val9.codeAfterApplying = (CodeAfterApplying)obj4;
new ModelPart(val9);
}
break;
case "EngiBody":
if (new Vector3(engiSize.Value, engiSize.Value, engiSize.Value) != Vector3.zero)
{
ModelPartInfo val25 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Chest"
};
object obj12 = <>O.<7>__PlaceItEngi;
if (obj12 == null)
{
CodeAfterApplying val26 = PlaceItEngi;
<>O.<7>__PlaceItEngi = val26;
obj12 = (object)val26;
}
val25.codeAfterApplying = (CodeAfterApplying)obj12;
new ModelPart(val25);
}
break;
case "EngiWalkerTurretBody":
if (new Vector3(engiWalkerTurretSize.Value, engiWalkerTurretSize.Value, engiWalkerTurretSize.Value) != Vector3.zero)
{
ModelPartInfo val13 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj6 = <>O.<8>__PlaceItEngiWalker;
if (obj6 == null)
{
CodeAfterApplying val14 = PlaceItEngiWalker;
<>O.<8>__PlaceItEngiWalker = val14;
obj6 = (object)val14;
}
val13.codeAfterApplying = (CodeAfterApplying)obj6;
new ModelPart(val13);
}
break;
case "EngiTurretBody":
if (new Vector3(engiTurretSize.Value, engiTurretSize.Value, engiTurretSize.Value) != Vector3.zero)
{
ModelPartInfo val27 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj13 = <>O.<9>__PlaceItEngiTurret;
if (obj13 == null)
{
CodeAfterApplying val28 = PlaceItEngiTurret;
<>O.<9>__PlaceItEngiTurret = val28;
obj13 = (object)val28;
}
val27.codeAfterApplying = (CodeAfterApplying)obj13;
new ModelPart(val27);
}
break;
case "MercBody":
if (new Vector3(mercSize.Value, mercSize.Value, mercSize.Value) != Vector3.zero)
{
ModelPartInfo val19 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj9 = <>O.<10>__PlaceItMerc;
if (obj9 == null)
{
CodeAfterApplying val20 = PlaceItMerc;
<>O.<10>__PlaceItMerc = val20;
obj9 = (object)val20;
}
val19.codeAfterApplying = (CodeAfterApplying)obj9;
new ModelPart(val19);
}
break;
case "VoidSurvivorBody":
if (new Vector3(fiendSize.Value, fiendSize.Value, fiendSize.Value) != Vector3.zero)
{
ModelPartInfo val11 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj5 = <>O.<11>__PlaceItVoid;
if (obj5 == null)
{
CodeAfterApplying val12 = PlaceItVoid;
<>O.<11>__PlaceItVoid = val12;
obj5 = (object)val12;
}
val11.codeAfterApplying = (CodeAfterApplying)obj5;
new ModelPart(val11);
}
break;
case "LoaderBody":
if (new Vector3(loaderSize.Value, loaderSize.Value, loaderSize.Value) != Vector3.zero)
{
ModelPartInfo val3 = new ModelPartInfo
{
bodyName = bodyName,
gameObject = gameObject,
inputString = "Head"
};
object obj = <>O.<12>__PlaceItLoader;
if (obj == null)
{
CodeAfterApplying val4 = PlaceItLoader;
<>O.<12>__PlaceItLoader = val4;
obj = (object)val4;
}
val3.codeAfterApplying = (CodeAfterApplying)obj;
new ModelPart(val3);
}
break;
}
}
};
}
private static void PlaceItBandit(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.15f, 0f);
modelObject.transform.localScale = new Vector3(banditSize.Value, banditSize.Value, banditSize.Value);
modelObject.transform.Rotate(new Vector3(10f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = banditHatMat;
}
private static void PlaceItCaptain(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.15f, 0f);
modelObject.transform.localScale = new Vector3(captainSize.Value, captainSize.Value, captainSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItCommando(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.3f, 0f);
modelObject.transform.localScale = new Vector3(commandoSize.Value, commandoSize.Value, commandoSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItRailgunner(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.175f, -0.025f);
modelObject.transform.localScale = new Vector3(railgunnerSize.Value, railgunnerSize.Value, railgunnerSize.Value);
modelObject.transform.Rotate(new Vector3(30f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItMage(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.15f, -0.1f);
modelObject.transform.localScale = new Vector3(artiSize.Value, artiSize.Value, artiSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItHuntress(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.3f, -0.05f);
modelObject.transform.localScale = new Vector3(huntressSize.Value, huntressSize.Value, huntressSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItCroco(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0f, 1.6f);
modelObject.transform.localScale = new Vector3(acridSize.Value, acridSize.Value, acridSize.Value);
modelObject.transform.Rotate(new Vector3(55f, 180f, 180f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItEngi(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.65f, 0f);
modelObject.transform.localScale = new Vector3(engiSize.Value, engiSize.Value, engiSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItEngiWalker(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 1f, 0f);
modelObject.transform.localScale = new Vector3(engiWalkerTurretSize.Value, engiWalkerTurretSize.Value, engiWalkerTurretSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItEngiTurret(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.3f, 0f);
modelObject.transform.localScale = new Vector3(engiTurretSize.Value, engiTurretSize.Value, engiTurretSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItMerc(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.2f, 0f);
modelObject.transform.localScale = new Vector3(mercSize.Value, mercSize.Value, mercSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItVoid(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.1f, 0f);
modelObject.transform.localScale = new Vector3(fiendSize.Value, fiendSize.Value, fiendSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
private static void PlaceItLoader(GameObject modelObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
modelObject.transform.localPosition = new Vector3(0f, 0.2f, 0f);
modelObject.transform.localScale = new Vector3(loaderSize.Value, loaderSize.Value, loaderSize.Value);
modelObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)((Component)modelObject.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = hatMat;
}
}
}