Decompiled source of BrokenHydraulics v1.0.0

BrokenHydraulics.dll

Decompiled 10 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 BrokenHydraulics.Patches;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("BrokenHydraulics")]
[assembly: AssemblyDescription("Due to the misuse of the ship doors, employees are now forbidden from closing the hydraulic doors early.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BrokenHydraulics")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8347DE20-74E4-4545-9A2A-B69861F68452")]
[assembly: AssemblyFileVersion("1.0.*")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.8769.30018")]
namespace BrokenHydraulics
{
	[BepInPlugin("Vee.BrokenHydraulics", "Vee's Broken Hydraulics", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		internal ManualLogSource Logger;

		private readonly Harmony _harmony = new Harmony("Vee.BrokenHydraulics");

		public static Plugin Instance { get; private set; }

		private void Awake()
		{
			if (!((Object)(object)Instance != (Object)null))
			{
				Instance = this;
				Logger = Logger.CreateLogSource("Vee.BrokenHydraulics");
				Logger.LogInfo((object)"Vee's Broken Hydraulics 1.0.0 has awakened.");
				_harmony.PatchAll(typeof(StartOfRoundPatch));
			}
		}
	}
	internal static class PluginData
	{
		internal const string ModGUID = "Vee.BrokenHydraulics";

		internal const string ModName = "Vee's Broken Hydraulics";

		internal const string ModVersion = "1.0.0";
	}
}
namespace BrokenHydraulics.Patches
{
	[HarmonyPatch(typeof(HangarShipDoor))]
	public class StartOfRoundPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void DisableDoorButtons(ref InteractTrigger ___triggerScript)
		{
			if (!StartOfRound.Instance.newGameIsLoading)
			{
				___triggerScript.interactable = false;
			}
		}
	}
}