Decompiled source of DisableShipVote v1.0.0

Disable Ship Vote.dll

Decompiled a year 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 Disable_Ship_Vote.Patches;
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("Disable Ship Vote")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Scan Computers")]
[assembly: AssemblyProduct("Disable Ship Vote")]
[assembly: AssemblyCopyright("Copyright © Scan Computers 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a05cab97-4bd6-4244-bc44-0bef40f19ea1")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Disable_Ship_Vote
{
	[BepInPlugin("KoogeesMods.DisableShipVote", "Disable Ship Vote", "1.0.0.0")]
	public class ModBase : BaseUnityPlugin
	{
		private const string modGUID = "KoogeesMods.DisableShipVote";

		private const string modName = "Disable Ship Vote";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("KoogeesMods.DisableShipVote");

		private static ModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("KoogeesMods.DisableShipVote");
			harmony.PatchAll(typeof(ModBase));
			harmony.PatchAll(typeof(TimeOfDayPatches));
			mls.LogInfo((object)"Disable Ship Vote has successfully loaded!");
		}
	}
}
namespace Disable_Ship_Vote.Patches
{
	[HarmonyPatch(typeof(TimeOfDay))]
	internal class TimeOfDayPatches
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void shipVotePatch(ref bool ___votedShipToLeaveEarlyThisRound)
		{
			___votedShipToLeaveEarlyThisRound = true;
		}
	}
}