Decompiled source of Keep hangar ship door closed v1.0.0

Keep_hangar_ship_door_closed.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Keep_hangar_ship_door_closed.Patches;
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("Keep_hangar_ship_door_closed")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Keep_hangar_ship_door_closed")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f33f32fc-f6d7-4123-ba27-8c8fded903e2")]
[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")]
namespace Keep_hangar_ship_door_closed
{
	[BepInPlugin("AJB.KeepHangarShipDoorClosed", "Keep hangar ship door closed", "1.0.0")]
	public class KeepHangarShipDoorClosedBase : BaseUnityPlugin
	{
		private const string modGUID = "AJB.KeepHangarShipDoorClosed";

		private const string modName = "Keep hangar ship door closed";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("AJB.KeepHangarShipDoorClosed");

		private static KeepHangarShipDoorClosedBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("AJB.KeepHangarShipDoorClosed");
			mls.LogInfo((object)"Keep hangar ship door mod is active");
			harmony.PatchAll(typeof(KeepHangarShipDoorClosedBase));
			harmony.PatchAll(typeof(HangarShipDoorPatch));
		}
	}
}
namespace Keep_hangar_ship_door_closed.Patches
{
	[HarmonyPatch(typeof(HangarShipDoor))]
	internal class HangarShipDoorPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void keepHangarShipDoorClosedPatch(ref float ___doorPower)
		{
			___doorPower = 1f;
		}
	}
}