Decompiled source of ItemCapPlus v1.0.2

ItemCapPlus.dll

Decompiled a month 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 HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("ItemCapPlus")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.0.0.0")]
[assembly: AssemblyInformationalVersion("0.0.0-alpha.0.2+07c2d5ad11cefb21e94e77794efddde1121a4af8")]
[assembly: AssemblyProduct("Increase the cap for some items")]
[assembly: AssemblyTitle("ItemCapPlus")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 ItemCapPlus
{
	[MycoMod(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("hed14.itemcapplus", "ItemCapPlus", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string PluginGUID = "hed14.itemcapplus";

		public const string PluginName = "ItemCapPlus";

		public const string PluginVersion = "1.0.0";

		internal static ManualLogSource Logger;

		private void Awake()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			Logger = ((BaseUnityPlugin)this).Logger;
			Logger.LogInfo((object)"Plugin hed14.itemcapplus is loaded!");
			new Harmony("hed14.itemcapplus").PatchAll();
			Logger.LogInfo((object)"Harmony patches applied.");
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class PlayerResourceMaxPatch
	{
		private static void Postfix(PlayerResource __instance, ref int __result)
		{
			__result = __instance.ID switch
			{
				"scrip" => 99999, 
				"romphus" => 9999, 
				"gussula" => 9999, 
				"beezia" => 9999, 
				"yeucon" => 9999, 
				"saxonite" => 9999, 
				"strange_comp" => 9999, 
				"scrap_standard" => 999, 
				"scrap_rare" => 999, 
				"scrap_epic" => 999, 
				"scrap_exotic" => 999, 
				"oyster" => 9999, 
				"pa_token" => 99, 
				"equip_loot" => 99, 
				"r_replicator" => 99, 
				"dur_drops" => 99, 
				"antimass" => 9999, 
				_ => __result, 
			};
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "ItemCapPlus";

		public const string PLUGIN_NAME = "Increase the cap for some items";

		public const string PLUGIN_VERSION = "0.0.0";
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}