using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using UnityEngine;
using UnityEngine.SceneManagement;
[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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("RainWrath")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RainWrath")]
[assembly: AssemblyTitle("RainWrath")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Ultrapit;
[BepInPlugin("RainWrath.draghtnim.ultrakill", "RainWrath", "1.0")]
public class Plugin : BaseUnityPlugin
{
private AssetBundle terminal;
public static bool IsCustomLevel = false;
private Scene scene;
private GameObject pitobj;
private GameObject newpitobj;
private AssetBundle bundlepit;
private static Plugin _instance;
private static string assemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
private static AssetBundle PitBundle = AssetBundle.LoadFromFile(Path.Combine(assemblyLocation, "FivePronouns.resource"));
private static GameObject[] prefabs = PitBundle.LoadAllAssets<GameObject>();
public static Plugin Instance => _instance;
private async void Awake()
{
_instance = this;
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
SceneManager.sceneLoaded += OnSceneLoaded;
}
private void OnDestroy()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
Scene activeScene = SceneManager.GetActiveScene();
logger.LogInfo((object)((Scene)(ref activeScene)).name);
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
bool flag = SceneHelper.CurrentScene == "Level 5-2";
bool flag2 = SceneHelper.CurrentScene == "Level 5-3";
((BaseUnityPlugin)this).Logger.LogInfo((object)SceneHelper.CurrentScene);
if (flag)
{
GameObject[] array = PitBundle.LoadAllAssets<GameObject>();
GameObject val = Object.Instantiate<GameObject>(array[1]);
}
if (flag2)
{
GameObject[] array2 = PitBundle.LoadAllAssets<GameObject>();
Object.Instantiate<GameObject>(array2[0]);
}
}
}