Decompiled source of MaxPerks v1.0.0

MaxPerks.dll

Decompiled 2 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using SSSGame.UI;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("blacks7ar")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+1bf54dc970fba719ce47152a6e6992677d59e82a")]
[assembly: AssemblyProduct("MaxPerks")]
[assembly: AssemblyTitle("MaxPerks")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MaxPerks
{
	[BepInPlugin("blacks7ar.MaxPerks", "MaxPerks", "1.0.0")]
	public class Plugin : BasePlugin
	{
		[HarmonyPatch]
		private static class Patch
		{
			[HarmonyPrefix]
			[HarmonyPatch(typeof(VillagerChoicePanel), "Set")]
			private static void MaxVisiblePerks_Postfix(VillagerChoicePanel __instance)
			{
				if (!((Object)(object)__instance == (Object)null))
				{
					__instance.maxVisiblePerks = 5;
				}
			}
		}

		private const string modGUID = "blacks7ar.MaxPerks";

		public const string modName = "MaxPerks";

		public const string modAuthor = "blacks7ar";

		public const string modVersion = "1.0.0";

		private static ManualLogSource MLogger;

		public override void Load()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			MLogger = ((BasePlugin)this).Log;
			MLogger.LogInfo((object)"Mod loaded!");
			new Harmony("blacks7ar.MaxPerks").PatchAll();
		}
	}
}