using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using MelonLoader;
using SuperGlassMCD;
using UnityEngine;
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyTitle("SuperGlassMCD")]
[assembly: AssemblyDescription("Make enemies transparent... like real glass ")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SuperGlassMCD")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: ComVisible(false)]
[assembly: Guid("6b6b8b3e-6f4a-4e2a-9d3f-2c9a1e6f7c12")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: MelonInfo(typeof(mainclass), "SuperGlassMCD", "1.0.0", "BayTurtleKing", null)]
[assembly: MelonGame("SUPERHOT_Team", "SHMCD")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SuperGlassMCD;
public class mainclass : MelonMod
{
public static Material transparenttmattt;
private static readonly int metaLlLlL = Shader.PropertyToID("_Metallic");
private static readonly int glowglow = Shader.PropertyToID("_EmissionColor");
private static readonly int shinyy = Shader.PropertyToID("_Glossiness");
private static readonly int specccccccccc = Shader.PropertyToID("_SpecColor");
public override void OnLateInitializeMelon()
{
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
transparenttmattt = new Material(Shader.Find("Standard"));
transparenttmattt.color = new Color(1f, 1f, 1f, 0.22f);
transparenttmattt.SetInt("_ZWrite", 0);
transparenttmattt.DisableKeyword("_ALPHAPREMULTIPLY_ON");
transparenttmattt.renderQueue = 3000;
transparenttmattt.SetInt("_SrcBlend", 5);
transparenttmattt.SetFloat(shinyy, 0.95f);
transparenttmattt.SetFloat(metaLlLlL, 0.05f);
transparenttmattt.EnableKeyword("_ALPHABLEND_ON");
transparenttmattt.SetColor(specccccccccc, new Color(1f, 1f, 1f, 1f));
transparenttmattt.DisableKeyword("_ALPHATEST_ON");
transparenttmattt.EnableKeyword("_EMISSION");
transparenttmattt.SetColor(glowglow, new Color(0.18f, 0.18f, 0.18f, 1f));
transparenttmattt.SetInt("_DstBlend", 10);
}
public override void OnSceneWasInitialized(int buildindex, string scenename)
{
logallgameobjectnames();
dodastuff();
makedashatterorbloodidkwhite();
}
private static void logallgameobjectnames()
{
GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>();
foreach (GameObject val in array)
{
if (((Object)val).name.ToLower().Contains("enemy") || ((Object)val).name.ToLower().Contains("particles"))
{
MelonLogger.Msg("found good: " + ((Object)val).name);
}
}
}
private static void makedashatterorbloodidkwhite()
{
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>();
foreach (GameObject val in array)
{
if (((Object)val).name.Contains("Particles - geometry") || ((Object)val).name.Contains("Particles - enemyballs"))
{
ParticleSystem component = val.GetComponent<ParticleSystem>();
ParticleSystemRenderer component2 = val.GetComponent<ParticleSystemRenderer>();
if ((Object)(object)component != (Object)null)
{
MainModule main = component.main;
((MainModule)(ref main)).startColor = new MinMaxGradient(Color.white);
}
if ((Object)(object)component2 != (Object)null)
{
((Renderer)component2).material = transparenttmattt;
}
}
}
}
private static void dodastuff()
{
GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>();
foreach (GameObject val in array)
{
if (((Object)val).name.Contains("Enemy") || ((Object)val).name.Contains("enemy"))
{
Renderer[] componentsInChildren = val.GetComponentsInChildren<Renderer>(true);
for (int j = 0; j < componentsInChildren.Length; j++)
{
componentsInChildren[j].material = transparenttmattt;
}
}
}
}
}