using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using MelonLoader;
using NoIntro;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(global::NoIntro.NoIntro), "NoIntro", "1.1.0", "HEIMO", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("NoIntro")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NoIntro")]
[assembly: AssemblyTitle("NoIntro")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoIntro;
public class NoIntro : MelonMod
{
[CompilerGenerated]
private sealed class <DeleteObjectsDelayed>d__5 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public NoIntro <>4__this;
private GameObject[] <allObjects>5__1;
private Transform <bonelabAnim>5__2;
private Transform <logoAnimTarget>5__3;
private GameObject[] <>s__4;
private int <>s__5;
private GameObject <obj>5__6;
private string[] <>s__7;
private int <>s__8;
private string <targetName>5__9;
private string[] <>s__10;
private int <>s__11;
private string <targetName>5__12;
private string[] <>s__13;
private int <>s__14;
private string <targetName>5__15;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <DeleteObjectsDelayed>d__5(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<allObjects>5__1 = null;
<bonelabAnim>5__2 = null;
<logoAnimTarget>5__3 = null;
<>s__4 = null;
<obj>5__6 = null;
<>s__7 = null;
<targetName>5__9 = null;
<>s__10 = null;
<targetName>5__12 = null;
<>s__13 = null;
<targetName>5__15 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(0.5f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<allObjects>5__1 = Il2CppArrayBase<GameObject>.op_Implicit(Resources.FindObjectsOfTypeAll<GameObject>());
<bonelabAnim>5__2 = null;
<logoAnimTarget>5__3 = null;
<>s__4 = <allObjects>5__1;
for (<>s__5 = 0; <>s__5 < <>s__4.Length; <>s__5++)
{
<obj>5__6 = <>s__4[<>s__5];
if (((Object)<obj>5__6).name == "BONELAB_ANIM")
{
<bonelabAnim>5__2 = <obj>5__6.transform;
}
if (((Object)<obj>5__6).name == "LogoAnimTarget")
{
<logoAnimTarget>5__3 = <obj>5__6.transform;
}
<>s__7 = <>4__this.objectsToRemove;
for (<>s__8 = 0; <>s__8 < <>s__7.Length; <>s__8++)
{
<targetName>5__9 = <>s__7[<>s__8];
if (((Object)<obj>5__6).name == <targetName>5__9)
{
Object.Destroy((Object)(object)<obj>5__6);
}
<targetName>5__9 = null;
}
<>s__7 = null;
<>s__10 = <>4__this.objectsToDisable;
for (<>s__11 = 0; <>s__11 < <>s__10.Length; <>s__11++)
{
<targetName>5__12 = <>s__10[<>s__11];
if (((Object)<obj>5__6).name == <targetName>5__12)
{
<obj>5__6.SetActive(false);
}
<targetName>5__12 = null;
}
<>s__10 = null;
<>s__13 = <>4__this.objectsToEnable;
for (<>s__14 = 0; <>s__14 < <>s__13.Length; <>s__14++)
{
<targetName>5__15 = <>s__13[<>s__14];
if (((Object)<obj>5__6).name == <targetName>5__15)
{
<obj>5__6.SetActive(true);
}
<targetName>5__15 = null;
}
<>s__13 = null;
<obj>5__6 = null;
}
<>s__4 = null;
if ((Object)(object)<bonelabAnim>5__2 != (Object)null && (Object)(object)<logoAnimTarget>5__3 != (Object)null)
{
<>4__this.CopyWorldTransform(<logoAnimTarget>5__3, <bonelabAnim>5__2);
}
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private readonly string[] objectsToRemove = new string[3] { "SLZ_ROOT", "CREDITS_ROOT", "fading Volume" };
private readonly string[] objectsToDisable = new string[5] { "group_Enter", "group_Mods", "group_Info", "grid_main", "group_BETA" };
private readonly string[] objectsToEnable = new string[5] { "BONELAB_ROOT", "Logo_BoneLab_Animated", "MENU", "group_Options", "LASERCURSOR" };
private void CopyWorldTransform(Transform source, Transform target)
{
//IL_0003: 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_001d: Unknown result type (might be due to invalid IL or missing references)
target.position = source.position;
target.rotation = source.rotation;
target.localScale = source.localScale;
}
public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
if (sceneName == "scene_Menu_VoidG114" || sceneName == "scene_Menu_Hollow")
{
MelonCoroutines.Start(DeleteObjectsDelayed());
}
}
[IteratorStateMachine(typeof(<DeleteObjectsDelayed>d__5))]
private IEnumerator DeleteObjectsDelayed()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <DeleteObjectsDelayed>d__5(0)
{
<>4__this = this
};
}
}