using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using LethalLib.Modules; using UnityEngine; [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("Patches")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Patches")] [assembly: AssemblyTitle("Patches")] [assembly: AssemblyVersion("1.0.0.0")] namespace EnregistrementPorteDirect; [BepInPlugin("com.mrkixcat.junkroomspatch", "JunkroomsPatch", "1.0.0")] public class Plugin : BaseUnityPlugin { private void Awake() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string text = Path.Combine(directoryName, "junkrooms.lethalbundle"); if (!File.Exists(text)) { return; } AssetBundle val = AssetBundle.LoadFromFile(text); if ((Object)(object)val == (Object)null) { return; } string text2 = ""; string[] allAssetNames = val.GetAllAssetNames(); string[] array = allAssetNames; foreach (string text3 in array) { if (text3.Contains("entranceteleportb")) { text2 = text3; break; } } GameObject val2 = null; if (!string.IsNullOrEmpty(text2)) { val2 = val.LoadAsset(text2); } if ((Object)(object)val2 == (Object)null) { val2 = val.LoadAsset("EntranceTeleportB"); } if ((Object)(object)val2 == (Object)null) { val2 = val.LoadAsset("EntranceTeleportB.prefab"); } if ((Object)(object)val2 == (Object)null) { val.Unload(false); return; } NetworkPrefabs.RegisterNetworkPrefab(val2); val.Unload(false); } }