Decompiled source of NoLockedDoors v1.1.1

NoLockedDoors.dll

Decompiled 10 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
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("NoLockedDoors")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoLockedDoors")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8f17286f-ea8e-47e7-943f-738b19f2d509")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace NoLockedDoors;

[BepInPlugin("Jefvaia.NoLockedDoors", "NoLockedDoors", "1.1.1")]
public class NoLockMod : BaseUnityPlugin
{
	private readonly Harmony harmony = new Harmony("Jefvaia.NoLockedDoors");

	private static NoLockMod Instance;

	internal ManualLogSource mls;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		mls = Logger.CreateLogSource("Jefvaia.NoLockedDoors");
		mls.LogInfo((object)"Unlocking all doors...");
		harmony.PatchAll(typeof(NoLockMod));
		harmony.PatchAll(typeof(LockedDoorPatch));
	}
}
[HarmonyPatch(typeof(DoorLock), "LockDoor")]
public static class LockedDoorPatch
{
	[HarmonyPostfix]
	public static void LockDoorPostfix(DoorLock __instance)
	{
		__instance.UnlockDoorServerRpc();
	}
}