using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ClassLibrary1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ClassLibrary1")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c1529e90-0d0e-4897-b33c-6802f94b5a49")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("com.yourname.doorreplacer", "Door Replacer", "1.0.0")]
public class DoorReplacerMod : BaseUnityPlugin
{
private void Start()
{
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
((BaseUnityPlugin)this).Logger.LogInfo((object)"DoorReplacerMod loaded!");
string text = Path.Combine(Paths.PluginPath, "DoorReplacer", "doorbundle");
if (!File.Exists(text))
{
((BaseUnityPlugin)this).Logger.LogError((object)("AssetBundle not found: " + text));
return;
}
AssetBundle val = AssetBundle.LoadFromFile(text);
if ((Object)(object)val == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load AssetBundle.");
return;
}
GameObject val2 = val.LoadAsset<GameObject>("door v3 ahh");
if ((Object)(object)val2 == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load door prefab from bundle.");
return;
}
GameObject val3 = GameObject.Find("door");
if ((Object)(object)val3 == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Original door not found.");
return;
}
GameObject val4 = Object.Instantiate<GameObject>(val2, val3.transform.position, val3.transform.rotation);
val4.transform.localScale = val3.transform.localScale;
Object.Destroy((Object)(object)val3);
}
}