using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Microsoft.CodeAnalysis;
using On.RoR2;
using RoR2;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("Commeowndo")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Commeowndo")]
[assembly: AssemblyTitle("Commeowndo")]
[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 Commeowndo
{
[BepInPlugin("com.muddii.Commeowndo", "Commeowndo", "1.0.0")]
public class Commeowndo : BaseUnityPlugin
{
private Material hatMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Commando/matCommandoDualies.mat").WaitForCompletion();
public AssetBundleCreateRequest commeowndoAssets;
private GameObject catEars;
public void Awake()
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Expected O, but got Unknown
commeowndoAssets = AssetBundle.LoadFromFileAsync(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "commeowndo.bundle"));
ref GameObject reference = ref catEars;
Object asset = commeowndoAssets.assetBundle.LoadAssetAsync<GameObject>("assets/catears.prefab").asset;
reference = (GameObject)(object)((asset is GameObject) ? asset : null);
CharacterModel.Start += new hook_Start(CharacterModel_Start);
}
private void CharacterModel_Start(orig_Start orig, CharacterModel self)
{
orig.Invoke(self);
((MonoBehaviour)self).StartCoroutine(OwO(self));
}
private IEnumerator OwO(CharacterModel model)
{
yield return (object)new WaitForFixedUpdate();
if (!Object.op_Implicit((Object)(object)model.body))
{
yield break;
}
if (((Object)model.body).name == "CommandoBody(Clone)")
{
GameObject gameObject = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(0).GetChild(0).GetChild(0)
.GetChild(3)
.GetChild(0)
.GetChild(0));
gameObject.AddComponent<NetworkIdentity>();
gameObject.transform.localScale = new Vector3(2.5f, 4f, 2.5f);
gameObject.transform.localPosition = new Vector3(0f, -5f, -1.5f);
gameObject.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos2 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer5 in componentsInChildren)
{
rendererInfos2.Add(new RendererInfo
{
renderer = renderer5,
defaultMaterial = renderer5.sharedMaterial,
defaultShadowCastingMode = renderer5.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos2.ToArray();
}
else if (((Object)model.body).name == "RailgunnerBody(Clone)")
{
GameObject gameObject7 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(5).GetChild(0).GetChild(0)
.GetChild(2)
.GetChild(1)
.GetChild(2)
.GetChild(0));
gameObject7.AddComponent<NetworkIdentity>();
gameObject7.transform.localScale = new Vector3(1.5f, 2.9f, 2f);
gameObject7.transform.localPosition = new Vector3(0f, -3.674f, -1.1f);
gameObject7.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject7.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos8 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren2 = gameObject7.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer11 in componentsInChildren2)
{
rendererInfos8.Add(new RendererInfo
{
renderer = renderer11,
defaultMaterial = renderer11.sharedMaterial,
defaultShadowCastingMode = renderer11.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos8.ToArray();
}
else if (((Object)model.body).name == "MageBody(Clone)")
{
GameObject gameObject13 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(0).GetChild(2).GetChild(0)
.GetChild(3)
.GetChild(0)
.GetChild(2)
.GetChild(0));
gameObject13.AddComponent<NetworkIdentity>();
gameObject13.transform.localScale = new Vector3(1.5f, 2.9f, 2f);
gameObject13.transform.localPosition = new Vector3(0f, -3.674f, -1.1f);
gameObject13.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject13.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos14 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren3 = gameObject13.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer14 in componentsInChildren3)
{
rendererInfos14.Add(new RendererInfo
{
renderer = renderer14,
defaultMaterial = renderer14.sharedMaterial,
defaultShadowCastingMode = renderer14.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos14.ToArray();
}
else if (((Object)model.body).name == "HuntressBody(Clone)")
{
GameObject gameObject14 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(2).GetChild(3).GetChild(0)
.GetChild(2)
.GetChild(0)
.GetChild(1));
gameObject14.AddComponent<NetworkIdentity>();
gameObject14.transform.localScale = new Vector3(1.6f, 2.9f, 2f);
gameObject14.transform.localPosition = new Vector3(0f, -3.55f, -1.1f);
gameObject14.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject14.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos13 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren4 = gameObject14.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer13 in componentsInChildren4)
{
rendererInfos13.Add(new RendererInfo
{
renderer = renderer13,
defaultMaterial = renderer13.sharedMaterial,
defaultShadowCastingMode = renderer13.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos13.ToArray();
}
else if (((Object)model.body).name == "Bandit2Body(Clone)")
{
GameObject gameObject12 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(4).GetChild(2).GetChild(0)
.GetChild(6)
.GetChild(0)
.GetChild(2));
gameObject12.AddComponent<NetworkIdentity>();
gameObject12.transform.localScale = new Vector3(1.7f, 2.9f, 2f);
gameObject12.transform.localPosition = new Vector3(0f, -3.68f, -1.05f);
gameObject12.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject12.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos12 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren5 = gameObject12.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer12 in componentsInChildren5)
{
rendererInfos12.Add(new RendererInfo
{
renderer = renderer12,
defaultMaterial = renderer12.sharedMaterial,
defaultShadowCastingMode = renderer12.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos12.ToArray();
}
else if (((Object)model.body).name == "CrocoBody(Clone)")
{
GameObject gameObject11 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(5).GetChild(0).GetChild(0)
.GetChild(2)
.GetChild(0)
.GetChild(2)
.GetChild(0)
.GetChild(0)
.GetChild(0));
gameObject11.AddComponent<NetworkIdentity>();
gameObject11.transform.localScale = new Vector3(15f, 15f, 15f);
gameObject11.transform.localPosition = new Vector3(0f, 1f, -19.2f);
gameObject11.transform.Rotate(new Vector3(270f, 180f, 0f));
((Renderer)gameObject11.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos11 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren6 = gameObject11.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer10 in componentsInChildren6)
{
rendererInfos11.Add(new RendererInfo
{
renderer = renderer10,
defaultMaterial = renderer10.sharedMaterial,
defaultShadowCastingMode = renderer10.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos11.ToArray();
}
else if (((Object)model.body).name == "BeetleGuardAllyBody(Clone)")
{
GameObject gameObject10 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(0).GetChild(0).GetChild(0)
.GetChild(0)
.GetChild(0));
gameObject10.AddComponent<NetworkIdentity>();
gameObject10.transform.localScale = new Vector3(15f, 19f, 19f);
gameObject10.transform.localPosition = new Vector3(0f, 0.54f, -25.4f);
gameObject10.transform.Rotate(new Vector3(270f, 180f, 0f));
((Renderer)gameObject10.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos10 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren7 = gameObject10.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer9 in componentsInChildren7)
{
rendererInfos10.Add(new RendererInfo
{
renderer = renderer9,
defaultMaterial = renderer9.sharedMaterial,
defaultShadowCastingMode = renderer9.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos10.ToArray();
}
else if (((Object)model.body).name == "MinorConstructOnKillBody(Clone)")
{
GameObject gameObject9 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(4).GetChild(0).GetChild(0)
.GetChild(2));
gameObject9.AddComponent<NetworkIdentity>();
gameObject9.transform.localScale = new Vector3(4f, 6f, 6f);
gameObject9.transform.localPosition = new Vector3(0f, -7.64f, -2.1f);
gameObject9.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject9.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos9 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren8 = gameObject9.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer8 in componentsInChildren8)
{
rendererInfos9.Add(new RendererInfo
{
renderer = renderer8,
defaultMaterial = renderer8.sharedMaterial,
defaultShadowCastingMode = renderer8.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos9.ToArray();
}
else if (((Object)model.body).name == "EngiBody(Clone)")
{
GameObject gameObject8 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(0).GetChild(2).GetChild(0)
.GetChild(3)
.GetChild(0));
gameObject8.AddComponent<NetworkIdentity>();
gameObject8.transform.localScale = new Vector3(2.4f, 3.7f, 2.4f);
gameObject8.transform.localPosition = new Vector3(0f, -4.21f, -1.3f);
gameObject8.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject8.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos7 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren9 = gameObject8.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer7 in componentsInChildren9)
{
rendererInfos7.Add(new RendererInfo
{
renderer = renderer7,
defaultMaterial = renderer7.sharedMaterial,
defaultShadowCastingMode = renderer7.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos7.ToArray();
}
else if (((Object)model.body).name == "EngiWalkerTurretBody(Clone)")
{
GameObject gameObject6 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(1).GetChild(0).GetChild(4)
.GetChild(0));
gameObject6.AddComponent<NetworkIdentity>();
gameObject6.transform.localScale = new Vector3(8f, 8f, 6f);
gameObject6.transform.localPosition = new Vector3(0f, -9.2f, -3.2f);
gameObject6.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject6.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos6 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren10 = gameObject6.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer6 in componentsInChildren10)
{
rendererInfos6.Add(new RendererInfo
{
renderer = renderer6,
defaultMaterial = renderer6.sharedMaterial,
defaultShadowCastingMode = renderer6.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos6.ToArray();
}
else if (((Object)model.body).name == "EngiTurretBody(Clone)")
{
GameObject gameObject5 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(1).GetChild(0).GetChild(4)
.GetChild(0));
gameObject5.AddComponent<NetworkIdentity>();
gameObject5.transform.localScale = new Vector3(8f, 8f, 6f);
gameObject5.transform.localPosition = new Vector3(0f, -9.8f, -3.2f);
gameObject5.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject5.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos5 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren11 = gameObject5.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer4 in componentsInChildren11)
{
rendererInfos5.Add(new RendererInfo
{
renderer = renderer4,
defaultMaterial = renderer4.sharedMaterial,
defaultShadowCastingMode = renderer4.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos5.ToArray();
}
else if (((Object)model.body).name == "MercBody(Clone)")
{
GameObject gameObject4 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(0).GetChild(2).GetChild(0)
.GetChild(3)
.GetChild(0)
.GetChild(3)
.GetChild(0));
gameObject4.AddComponent<NetworkIdentity>();
gameObject4.transform.localScale = new Vector3(1.8f, 2.8f, 2f);
gameObject4.transform.localPosition = new Vector3(0f, -3.5f, -1f);
gameObject4.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject4.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos4 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren12 = gameObject4.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer3 in componentsInChildren12)
{
rendererInfos4.Add(new RendererInfo
{
renderer = renderer3,
defaultMaterial = renderer3.sharedMaterial,
defaultShadowCastingMode = renderer3.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos4.ToArray();
}
else if (((Object)model.body).name == "VoidSurvivorBody(Clone)")
{
GameObject gameObject3 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(7).GetChild(0).GetChild(0)
.GetChild(1)
.GetChild(2)
.GetChild(2)
.GetChild(0));
gameObject3.AddComponent<NetworkIdentity>();
gameObject3.transform.localScale = new Vector3(2f, 4f, 2.5f);
gameObject3.transform.localPosition = new Vector3(0f, -5.17f, -1.5f);
gameObject3.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject3.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos3 = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren13 = gameObject3.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer2 in componentsInChildren13)
{
rendererInfos3.Add(new RendererInfo
{
renderer = renderer2,
defaultMaterial = renderer2.sharedMaterial,
defaultShadowCastingMode = renderer2.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos3.ToArray();
}
else if (((Object)model.body).name == "LoaderBody(Clone)")
{
GameObject gameObject2 = Object.Instantiate<GameObject>(catEars, ((Component)model).transform.GetChild(0).GetChild(0).GetChild(0)
.GetChild(5)
.GetChild(0)
.GetChild(3)
.GetChild(0));
gameObject2.AddComponent<NetworkIdentity>();
gameObject2.transform.localScale = new Vector3(1.9f, 2.8f, 2.5f);
gameObject2.transform.localPosition = new Vector3(0f, -3.5f, -1f);
gameObject2.transform.Rotate(new Vector3(15f, 0f, 0f));
((Renderer)gameObject2.GetComponent<MeshRenderer>()).material = hatMat;
List<RendererInfo> rendererInfos = model.baseRendererInfos.ToList();
Renderer[] componentsInChildren14 = gameObject2.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer in componentsInChildren14)
{
rendererInfos.Add(new RendererInfo
{
renderer = renderer,
defaultMaterial = renderer.sharedMaterial,
defaultShadowCastingMode = renderer.shadowCastingMode,
hideOnDeath = false,
ignoreOverlays = false
});
}
model.baseRendererInfos = rendererInfos.ToArray();
}
}
}
}