Decompiled source of JustNoRoof v1.1.0

JustNoRoof.dll

Decompiled 4 months ago
using System;
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.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: Guid("46BDCABE-BEB1-491F-8631-310F5186A3DB")]
[assembly: ComVisible(false)]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyProduct("JustNoRoof")]
[assembly: AssemblyCompany("JustAFrogger")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("JustNoRoof")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[Microsoft.CodeAnalysis.Embedded]
	[CompilerGenerated]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	[Microsoft.CodeAnalysis.Embedded]
	[CompilerGenerated]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace JustNoRoof
{
	[HarmonyPatch]
	public class Patch
	{
		[HarmonyPrefix]
		[HarmonyPatch(typeof(CraftingStation), "CheckUsable")]
		public static bool Prefix(ref bool __result)
		{
			if (Plugin.enabledConfig.Value)
			{
				__result = true;
				return false;
			}
			return true;
		}
	}
	[BepInPlugin("com.Frogger.JustNoRoof", "JustNoRoof", "1.1.0")]
	internal class Plugin : BaseUnityPlugin
	{
		internal const string ModName = "JustNoRoof";

		internal const string ModVersion = "1.1.0";

		internal const string ModGUID = "com.Frogger.JustNoRoof";

		internal static ConfigEntry<bool> enabledConfig;

		internal static Plugin _self;

		private void Awake()
		{
			_self = this;
			enabledConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enabled", true, "Enable/disable the mod.");
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "com.Frogger.JustNoRoof");
		}
	}
}